-
-
Notifications
You must be signed in to change notification settings - Fork 239
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(suite): add fiat rates to common #10385
Conversation
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
75040fd
to
1ff4f5a
Compare
e0a7080
to
5457185
Compare
49b8fbc
to
26eed0e
Compare
In hindsight it's easier to evaluate, but next time an issue like this would definitely be better broken into smaller PRs. There are some refactorings and even smaller fixes, that could have been already in develop and previous releases that way. |
294ca87
to
458045e
Compare
8f54eb9
to
a859b5a
Compare
packages/suite/src/views/wallet/tokens/components/TokenList.tsx
Outdated
Show resolved
Hide resolved
packages/suite/src/views/wallet/transactions/TradeBox/TradeBoxPrices.tsx
Outdated
Show resolved
Hide resolved
packages/suite/src/views/wallet/transactions/TradeBox/TradeBoxPrices.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- When rates are not available, price updated 19k days ago (Added to new issue UI of fiat rates in Suite (last updated, loading,...) #10435)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@peter-sanderson @matejkriz could you please resolve your comments and check mine changes?
Fiat rates are displayed correctly for all networks.
Fiat rates are updated based on time, currency change
Fiat rates are available for ERC-20 and SOL (I havent checked ADA)
fiatRatesSelector
is "duplicated" from native with some small changes such as removed memoization. @Nodonisko plans to do some more changes in mobile file, so it will remain duplicated at least for now.
Created issues
#10431 historical rates for tokens
#10435 incomplete handling of failed fetch of fiat rates, loading states,... more related to UI
#10464 do not use deprecated selector for fiat rates
bef02ef
to
3fc55d3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
/rebase |
Start rebasing: https://github.com/trezor/trezor-suite/actions/runs/7387504597 |
7fc2b76
to
3ec33e0
Compare
Recreation of rebased #9292 PR
Description
Desktop now uses almost the same fetching logic as mobile. The initial plan was to move it to @suite-comon/wallet-common and reuse it on both mobile and desktop but for now I kept the native code almost unchanged.
Live update of fiat rates from blockbook via websocket has been removed completely and there is only periodic fetch. That should be sufficient because the Blockbook only updates fiat rates once every 15 minutes anyway.
Fiat rates has been removed from permanent storage, so they need to be fetched again after reload of the app.
Related Issue
Resolve #8109
Resolve #8110
Resolve #9163