[DON'T MERGE] Use data service to fetch historical prices from Price API#41522
[DON'T MERGE] Use data service to fetch historical prices from Price API#41522
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This PR demonstrates what a data service class to hit the Accounts API would look like. It's designed to fetch the list of transactions in the extension. For more, see: <MetaMask/metamask-extension#41522> Please note this PR is only intended for demo purposes. For a living example of a data service, including tests, please see: <https://github.com/MetaMask/core/blob/main/packages/sample-controllers/src/sample-gas-prices-service/sample-gas-prices-service.ts>
This PR demonstrates what a data service class to hit the Accounts API would look like. It's designed to fetch the list of transactions in the extension. For more, see: <MetaMask/metamask-extension#41522> Please note this PR is only intended for demo purposes. For a living example of a data service, including tests, please see: <https://github.com/MetaMask/core/blob/main/packages/sample-controllers/src/sample-gas-prices-service/sample-gas-prices-service.ts>
c480d29 to
f3f503c
Compare
|
Caution MetaMask internal reviewing guidelines:
|
Builds ready [f3f503c]
⚡ Performance Benchmarks (Total: 🟢 8 pass · 🟡 1 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
This PR demonstrates what a data service class to hit the Accounts API would look like. It's designed to fetch the list of transactions in the extension. For more, see: <MetaMask/metamask-extension#41522> Please note this PR is only intended for demo purposes. For a living example of a data service, including tests, please see: <https://github.com/MetaMask/core/blob/main/packages/sample-controllers/src/sample-gas-prices-service/sample-gas-prices-service.ts>
This PR demonstrates what a data service class to hit the Accounts API would look like. It's designed to fetch the list of transactions in the extension. For more, see: <MetaMask/metamask-extension#41522> Please note this PR is only intended for demo purposes. For a living example of a data service, including tests, please see: <https://github.com/MetaMask/core/blob/main/packages/sample-controllers/src/sample-gas-prices-service/sample-gas-prices-service.ts>
This PR demonstrates how `useQuery` from `@metamask/react-data-query` can be used to fetch data through a data service, which makes a request, instead of making a request directly in the UI. Also see: MetaMask/core#8393
f3f503c to
516df84
Compare
Description
This PR demonstrates how
useQueryfrom@metamask/react-data-querycan be used to fetch data through a data service, which makes a request, instead of making a request directly in the UI.See corresponding
corePR: MetaMask/core#8393Changelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist