feat: update asset endpoints to include RWA data#7548
Conversation
|
@metamaskbot publish-preview |
1 similar comment
|
@metamaskbot publish-preview |
|
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions. |
|
@metamaskbot publish-preview |
|
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions. |
|
@metamaskbot publish-preview |
|
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions. |
| }, | ||
| "packages/assets-controllers/src/TokenListController.ts": { | ||
| "@typescript-eslint/explicit-function-return-type": { | ||
| "count": 6 |
There was a problem hiding this comment.
This change will fix the lint complaining about --prune-suppressions paratmeter, but when we put that parameter to run yarn lint it still complain. the only way is to change the count here to pass the error, if your guys know some better way to fix this issue, i am happy to change it back here.
|
Due to AssetPicker feature will change the format of rwaData, discussed with team, i convert this PR back to draft. |
|
@metamaskbot publish-preview |
|
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions. |
|
@metamaskbot publish-preview |
|
@metamaskbot publish-preview |
|
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions. |
|
@metamaskbot publish-preview |
|
@metamaskbot publish-preview |
2 similar comments
|
@metamaskbot publish-preview |
|
@metamaskbot publish-preview |
3d0a707 to
031892f
Compare
| maxMarketCap, | ||
| excludeLabels, | ||
| includeRwaData, | ||
| // default set to true so we don't need to pass it in the function call |
There was a problem hiding this comment.
Don't need this comment.
| // Use globalThis.Headers if available, otherwise skip setting headers (Node.js has no fetch headers by default) | ||
| if (typeof globalThis.Headers === 'function') { | ||
| fetchOptions.headers = new globalThis.Headers(); | ||
| fetchOptions.headers.set('Content-Type', 'application/json'); | ||
| } |
There was a problem hiding this comment.
We can revert this in favour of the fix proposed in the original diff.
const fetchOptions: RequestInit = {
...
headers: {
'Content-Type': 'application/json',
},
}
Co-authored-by: Prithpal Sooriya <prithpal.sooriya@consensys.net>
014cad9 to
9be0dfe
Compare
906d937 to
c871b6b
Compare
c871b6b to
eccba41
Compare
0458e05 to
e0b237b
Compare
This is a PR to add RWA data to asset endpoints.
Explanation
CHANGELOG entry: fetch the rwaData from token API endpoints and then pass to frontend to render.
References
Checklist
Note
Adds RWA metadata end-to-end in asset flows.
includeRwaData=trueontoken,tokens,tokens/search, andv3/tokens/trendingendpoints; defaultsincludeRwaDatato true insearchTokensandgetTrendingTokensTokenand asset item shapes to include optionalrwaData; propagates throughTokensController,TokenDetectionController,TokenRatesController, andtoken-selectorsTokenListControllermethodsWritten by Cursor Bugbot for commit 3891eeb. This will update automatically on new commits. Configure here.