-
Notifications
You must be signed in to change notification settings - Fork 561
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
base: main
Are you sure you want to change the base?
Conversation
@@ -38,7 +38,7 @@ export const getCurrencyRateHandler: PermittedHandlerExport< | |||
}; | |||
|
|||
const GetCurrencyRateParametersStruct = object({ | |||
currency: union([currency('btc')]), | |||
currency: union([currency('btc'), currency('sol')]), |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 :(
There was a problem hiding this comment.
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')]), |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 ReportAll modified and coverable lines are covered by tests ✅
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. 🚨 Try these New Features:
|
This PR adds the
sol
to the supported currency union insnap_getCurrencyRate
params