Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Remove old CeloGoldHistoryChart #5307

Merged
merged 20 commits into from
Apr 29, 2024
Merged

chore: Remove old CeloGoldHistoryChart #5307

merged 20 commits into from
Apr 29, 2024

Conversation

finnian0826
Copy link
Contributor

@finnian0826 finnian0826 commented Apr 23, 2024

Description

  • Usage of CeloGoldHistoryChart removed
  • exchangeHistorySelector usage replaced with token.historicalPricesUsd.lastDay
  • sage/reducer/action cleaned up
  • exchange folder remaned to celoNews

Test plan

builds, root state schema updated

Related issues

Backwards compatibility

Yes

Network scalability

If a new NetworkId and/or Network are added in the future, the changes in this PR will:

  • N/A

@finnian0826 finnian0826 marked this pull request as ready for review April 23, 2024 22:35
Copy link
Contributor

@satish-ravi satish-ravi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup! Needs resolving conflicts

@@ -1,5 +1,6 @@
import { parsePhoneNumber } from '@celo/phone-utils'
import { ADDRESS_LENGTH } from 'src/exchange/reducer'

const ADDRESS_LENGTH = 42

export const isAddressFormat = (content: string): boolean => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not directly related to your PR, but guess this is something we could replace with a viem helper, which I believe we use in the qr scanner. Maybe leave a note / make a tech debt issue?

@@ -1744,4 +1753,7 @@ export const migrations = {
pointsConfigStatus: 'idle',
},
}),
208: (state: any) => ({
...(_.omit(state, 'exchange') as any),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the as any required?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah without it I get errors when running yarn build, the as any is used in a couple other places where an omit like this is done

Copy link

codecov bot commented Apr 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.04%. Comparing base (3846796) to head (bd466f8).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5307      +/-   ##
==========================================
+ Coverage   85.92%   86.04%   +0.12%     
==========================================
  Files         738      735       -3     
  Lines       30173    29948     -225     
  Branches     5168     5123      -45     
==========================================
- Hits        25925    25770     -155     
+ Misses       4016     3951      -65     
+ Partials      232      227       -5     
Files Coverage Δ
src/account/utils.ts 100.00% <100.00%> (ø)
src/alert/reducer.ts 64.70% <100.00%> (-5.30%) ⬇️
src/analytics/Events.tsx 100.00% <ø> (ø)
src/analytics/Properties.tsx 100.00% <ø> (ø)
src/app/reducers.ts 22.82% <ø> (ø)
src/app/saga.ts 73.16% <100.00%> (ø)
src/celoNews/CeloNewsFeed.tsx 97.14% <100.00%> (ø)
src/celoNews/CeloNewsFeedItem.tsx 100.00% <ø> (ø)
src/firebase/saga.ts 67.30% <100.00%> (+24.14%) ⬆️
src/redux/migrations.ts 97.04% <100.00%> (+<0.01%) ⬆️
... and 8 more

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3846796...bd466f8. Read the comment docs.

src/redux/migrations.test.ts Outdated Show resolved Hide resolved
test/RootStateSchema.json Outdated Show resolved Hide resolved
test/schemas.ts Outdated Show resolved Hide resolved
src/redux/migrations.ts Outdated Show resolved Hide resolved
Comment on lines 168 to 169
await scrollIntoView(`Learn more about ${name}`, 'TokenDetailsScrollView')
await waitForElementByIdAndTap('TokenDetails/LearnMore')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optional nit: seems odd to use text for scrolling and id for tapping. would be nice if this was consistent

const tokensBySymbol = useSelector(tokensBySymbolSelector)

const onTap = useCallback(() => {
ValoraAnalytics.track(CeloExchangeEvents.celo_chart_tapped)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we remove this analytics event?

Copy link

emerge-tools bot commented Apr 29, 2024

1 build decreased size

Name Version Download Change Install Change Approval
Celo (test)
org.celo.mobile.test
1.83.0 (148) 27.5 MB ⬇️ 5.7 kB (-0.02%) 65.6 MB ⬇️ 16.4 kB (-0.03%) N/A

Celo (test) 1.83.0 (148)
org.celo.mobile.test

⚖️ Compare build
📦 Install build
⏱️ Analyze build performance

Total install size change: ⬇️ 16.4 kB (-0.03%)
Total download size change: ⬇️ 5.7 kB (-0.02%)

Largest size changes

Item Install Size Change
main.jsbundle ⬇️ -16.4 kB

🛸 Powered by Emerge Tools

@finnian0826 finnian0826 added this pull request to the merge queue Apr 29, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 29, 2024
@finnian0826 finnian0826 added this pull request to the merge queue Apr 29, 2024
Merged via the queue into main with commit 90233b9 Apr 29, 2024
16 checks passed
@finnian0826 finnian0826 deleted the finnian0826/act-1039 branch April 29, 2024 19:12
@@ -3286,6 +3286,14 @@ export const v210Schema = {
},
}

export const v211Schema = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@finnian0826 Just noticed this when attempting to add a new schema in a separate PR, but I think there's a missing schema here.

...v210Schema,
..._.omit(v210Schema, 'exchange'),
  _persist: {
    ...v210Schema._persist,
    version: 211,
  },
}

shottah pushed a commit to zed-io/kolektivo that referenced this pull request May 15, 2024
### Description

- Usage of CeloGoldHistoryChart removed
- exchangeHistorySelector usage replaced with
token.historicalPricesUsd.lastDay
- sage/reducer/action cleaned up
- exchange folder remaned to celoNews

### Test plan

builds, root state schema updated

### Related issues

- Fixes #ACT-1039

### Backwards compatibility

Yes

### Network scalability

If a new NetworkId and/or Network are added in the future, the changes
in this PR will:

- N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants