Skip to content

Conversation

@GuillaumeRx
Copy link
Contributor

This PR adds the sol to the supported currency union in snap_getCurrencyRate params

@GuillaumeRx GuillaumeRx requested a review from a team as a code owner November 25, 2024 13:09

const GetCurrencyRateParametersStruct = object({
currency: union([currency('btc')]),
currency: union([currency('btc'), currency('sol')]),
Copy link
Member

Choose a reason for hiding this comment

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

Why does our getCurrencyRate RPC method only support such a limited subset of assets? I would assume we have a lot more rates available?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because the RateController is pretty limited :(

Copy link
Contributor Author

Choose a reason for hiding this comment

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


const GetCurrencyRateParametersStruct = object({
currency: union([currency('btc')]),
currency: union([currency('btc'), currency('sol')]),
Copy link
Member

Choose a reason for hiding this comment

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

Should we not be using CAIP-19 for this API already?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can refactor to use CAIP-19 IDs

@codecov
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.48%. Comparing base (a5714d5) to head (64ec171).
Report is 9 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2904   +/-   ##
=======================================
  Coverage   94.48%   94.48%           
=======================================
  Files         487      487           
  Lines       10427    10427           
  Branches     1598     1598           
=======================================
  Hits         9852     9852           
  Misses        575      575           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@GuillaumeRx GuillaumeRx closed this Dec 5, 2024
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.

3 participants