-
-
Notifications
You must be signed in to change notification settings - Fork 266
feat: update token metadata service to include RWA data in API requests #7595
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,10 +19,11 @@ import { | |
| formatAggregatorNames, | ||
| formatIconUrlWithProxy, | ||
| } from './assetsUtil'; | ||
| import { fetchTokenListByChainId } from './token-service'; | ||
| import { TokenRwaData, fetchTokenListByChainId } from './token-service'; | ||
|
|
||
| const DEFAULT_INTERVAL = 24 * 60 * 60 * 1000; | ||
| const DEFAULT_THRESHOLD = 24 * 60 * 60 * 1000; | ||
| // 4 Hour Interval Cache Refresh Threshold | ||
| const DEFAULT_INTERVAL = 4 * 60 * 60 * 1000; | ||
| const DEFAULT_THRESHOLD = 4 * 60 * 60 * 1000; | ||
|
Comment on lines
+24
to
+26
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As discussed in slack - we have modified the cache interval from 24 hours to 4 hours. We should monitor if this causes any performance hits - (mostly from the large writes to state)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought we wanted to pass this in constructor client side instead of updating the controller's default values?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. meeeeh I don't mind either or... But this would minimise client changes required. Open to options on this :)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmmm agree, tbh doing it on constructor seems to be the proper way to go about this.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sweet, lets do it inside the controller for now -- less changes that devs need to make. We can treat the ones inside the constructor as "overrides" if it needs to be overridden.
Prithpal-Sooriya marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| const name = 'TokenListController'; | ||
|
|
||
|
|
@@ -34,6 +35,7 @@ export type TokenListToken = { | |
| occurrences: number; | ||
| aggregators: string[]; | ||
| iconUrl: string; | ||
| rwaData?: TokenRwaData; | ||
| }; | ||
|
|
||
| export type TokenListMap = Record<string, TokenListToken>; | ||
|
|
||
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.
We have a PR to update to the new endpoint #7572
However this is postponed to reduce the scope of changes for the RWA feature launch.