-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat(connector): [coinbase] currency unit conversion #2658
base: main
Are you sure you want to change the base?
feat(connector): [coinbase] currency unit conversion #2658
Conversation
@swangi-kumari @VedantKhairnar pls. take a look at my PR and suggest the changes needed. |
@DhairyaMajmudar Could you address the failing CI checks? |
Hello @DhairyaMajmudar , Pls address the CI fails Run and |
Sure I will do the same |
@swangi-kumari ma'am I have done the suggested changes even though its showing some run fails regarding formating and pr message. |
Hi @DhairyaMajmudar |
Very Sorry sir for my inactivity I will surely follow do the req. changes and commit it in the pr. |
converting the iamount to String
@SamraatBansal I have made the suggested changes pls. review them. |
Hello @DhairyaMajmudar , Pls address the CI fails Run cargo +nightly fmt for formatting. |
fn try_from(item: &types::PaymentsAuthorizeRouterData) -> Result<Self, Self::Error> { | ||
get_crypto_specific_payment_data(item) | ||
fn try_from(item:&CoinbseRouterData<&types::PaymentsAuthorizeRouterData) -> Result<Self, Self::Error> { | ||
get_crypto_specific_payment_data(item.RouterData) |
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.
Hey @DhairyaMajmudar
You have to change the definition of get_crypto_specific_payment_data
such that it starts accepting CoinbseRouterData<&types::PaymentsAuthorizeRouterData>
as an argument rather than passing item.router_data
.
Please refer to this for more context similar change was made. https://github.com/juspay/hyperswitch/pull/2645/files
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 am a bit confused in this change can you pls. perform this task to remove the confusion
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.
Hey @DhairyaMajmudar
I cannot perform this task for you, I have referred you with an already merged PR you just have to follow it and replicate it.
Basically you just have to change the type of the argument which the function is accepting.
Hey @DhairyaMajmudar , |
Hey @DhairyaMajmudar , |
Type of Change
Description
This pull request introduces the get_currecny_unit from ConnectorCommon trait for
CoinBase
. This function allows connectors to declare their accepted currency unit as either "Base" or "Minor" .For coinbase it accepts currency as Base.Additional Changes
How did you test it?
We need to create a payment using coinbase and test the currency unit from connector response and connector dashboard.
Checklist
cargo +nightly fmt --all
cargo clippy