MetaMask / metamask-docs

Developer documentation for MetaMask
https://docs.metamask.io
Apache License 2.0
674 stars 978 forks source link

Document snap_getCurrencyRate #1665

Open Montoya opened 1 month ago

Montoya commented 1 month ago

This is a new method that is not documented. The method is here:

https://github.com/MetaMask/snaps/blob/ec811b7d140fd6a4ce3e7e68970bef7c55e89162/packages/snaps-sdk/src/types/methods/get-currency-rate.ts#L23

It allows a Snap to get the internal currency conversion from MetaMask

ajeetd commented 1 month ago

Get the exchange value for the requested crypto against the users preferried fiat currency in the extension. Currently only BTC.

ziad-saab commented 1 month ago

@Montoya or @ajeetd : I tried the latest published version of the snaps-sdk and it doesn't yet have that method in its types. i think i should be able to get around that for testing, if I can find an appropriate version of Flask to test on. can you please provide one?