-
Notifications
You must be signed in to change notification settings - Fork 258
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
Paul/new banxa #4476
Paul/new banxa #4476
Conversation
2931480
to
b251601
Compare
"paymentTypes": ["pix"], | ||
"description": "Fee: 3-4%\nSettlement: 5 min - 24 hours", | ||
"title": "Pix", | ||
"// Do not enable until we have a Pix logo": "", |
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.
Still enabled
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.
Didn't want to block this merge for 3.19 and we can easily patch later. I created a task for design to create one.
@@ -37,7 +37,7 @@ export type FiatProviderQuoteErrorTypes = FiatProviderQuoteErrorTypesLimit | Fia | |||
// amountType | |||
export type FiatProviderQuoteError = | |||
| { providerId: string; errorType: FiatProviderQuoteErrorTypesOther } | |||
| { providerId: string; errorType: FiatProviderQuoteErrorTypesLimit; errorAmount?: number } | |||
| { providerId: string; errorType: FiatProviderQuoteErrorTypesLimit; errorAmount?: number; displayCurrencyCode?: string } |
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.
direction
would be useful to add here too
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.
Nevermind, saw the next commit
@@ -107,12 +107,12 @@ export const amountQuoteFiatPlugin: FiatPluginFactory = async (params: FiatPlugi | |||
// Pop up modal to pick wallet/asset | |||
// TODO: Filter wallets according to fiats supported by allowed providers |
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.
This TODO seems outdated now. Looks like we're just going to always force a fiat
if required, regardless of the wallet fiat
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.
Not always. There are cases where a payment method can allow different fiats. ie Visa/MC
@@ -206,17 +208,18 @@ export const amountQuoteFiatPlugin: FiatPluginFactory = async (params: FiatPlugi | |||
goodQuotes.push(quote) | |||
} | |||
|
|||
const noQuoteText = direction === 'buy' ? lstrings.fiat_plugin_buy_no_quote : lstrings.fiat_plugin_sell_no_quote |
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.
Move error string logic into getBestError/getErrorText
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.
This would duplicate the logic in the two funcs getBestError/getErrorText. Where it is now keeps the logic consistent.
src/plugins/gui/amountQuotePlugin.ts
Outdated
@@ -137,7 +137,7 @@ export const amountQuoteFiatPlugin: FiatPluginFactory = async (params: FiatPlugi | |||
showUi.enterAmount({ | |||
headerTitle: isBuy ? sprintf(lstrings.fiat_plugin_buy_currencycode, currencyCode) : sprintf(lstrings.fiat_plugin_sell_currencycode_s, currencyCode), | |||
initState: { | |||
value1: '500' | |||
value1: defaultFiatAmount ?? '500' |
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.
Let's move the default assignment to the top
lockUriPath: true, | ||
nativePlugin: amountQuoteFiatPlugin, | ||
forceFiatCurrencyCode: 'iso:TRY', | ||
defaultFiatAmount: '2000', |
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 is this amount so much higher than our normal 500?
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.
Turkish Lira is worth a LOT less
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.
500 Lira doesn't meet the minimum purchase
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.
Maybe we can do a TODO to have a conversion mechanism for default fiats if we ever do fiat-fiat rates
9dc75e2
to
b6c39ad
Compare
b6c39ad
to
7764395
Compare
/rebase |
Replace some wyre plugin check with dummy plugin check to retain code logic for future use.
Not all are enabled in this commit
This bypasses the wallet currency code so certain payment types can be ensured to use the right currency code filters (ie sepa)
Remove Poli as it is being deprecated
Retaining component code for rewards card as we expect to re-use that in the future.
This requires allowing the min/max limit error to specify the currencycode as Banxa only supports limits in the fiat amount, not the crypto amount
The original index of paymenttype would duplicate payment methods of the same payment type to stomp on top of each other. The 'id' is the true unique identifier.
Banxa's `api/payment-methods` does not return sell payment methods unless a source asset is specified. Even then it only returns paymentmethod objects which specify that one asset as allowed. We now query the sell payment methods at getSupportedAssets for BTC, then possibly again in getQuote if the crypto asset isn't in the cache.
7764395
to
a78925c
Compare
CHANGELOG
noneDependencies
noneRequirements
If you have made any visual changes to the GUI. Make sure you have: