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

fix: multichainToken rate for non evm #5175

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

salimtb
Copy link
Contributor

@salimtb salimtb commented Jan 20, 2025

Explanation

References

Changelog

@metamask/package-a

  • : Your change here
  • : Your change here

@metamask/package-b

  • : Your change here
  • : Your change here

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@salimtb salimtb force-pushed the salim/solana-tokens-rate-controller-non-evm branch from 51c3893 to ac5d0e4 Compare January 20, 2025 13:01
* @param includeMarketData - Whether to include market data in the response.
* @returns A promise that resolves to the rate of the token in USD.
*/
export function fetchMultiChainRates(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this function will be removed and replaced with the one from snap API , but for now we work with mocked data

): Promise<MarketDataDetailsFromPriceAPi> {
const url = `http://localhost:3000/v3/spot-prices?assetIds=${assetIds.join(
',',
)}${includeMarketData && `&includeMarketData=true`}${`vsCurrency=usd`}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Does vsCurrency=usd need an &? &vsCurrency=usd?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, I don't think we need the ${} for vsCurrency=usd

Copy link
Contributor Author

@salimtb salimtb Jan 22, 2025

Choose a reason for hiding this comment

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

the api call will be replaced by the snap call below once this one will be ready

https://github.com/MetaMask/SIPs/pull/154/files#diff-d13ba923939d83e166cd51c5051566c06e60068d79d2ad2897f951df66847fe8R96-R106

for now i'm just using a call to a local fake server, but we will not have api call anymore

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.

2 participants