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

Add sol to supported currency in snap_getCurrencyRate #2904

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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
@@ -38,7 +38,7 @@ export const getCurrencyRateHandler: PermittedHandlerExport<
};

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.

@@ -38,7 +38,7 @@ export const getCurrencyRateHandler: PermittedHandlerExport<
};

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

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).

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.


🚨 Try these New Features:

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