You've already forked AstralRinth
forked from didirus/AstralRinth
polish: withdraw flow fixes (#4713)
* fix: negative value stuff * fix: mobile responsiveness for modal min-w * feat: better error handling on withdraw * fix: empty state positioning + svg sizing * fix: title case -> sentence case * fix: re-add virtual visa under gift cards * fix: hide <1% segments
This commit is contained in:
@@ -449,12 +449,12 @@ export function createWithdrawContext(
|
||||
const formCompleted = balance?.form_completion_status === 'complete'
|
||||
|
||||
if (formCompleted) {
|
||||
return availableBalance
|
||||
return Math.max(0, availableBalance)
|
||||
}
|
||||
|
||||
const usedLimit = balance?.withdrawn_ytd ?? 0
|
||||
const remainingLimit = Math.max(0, TAX_THRESHOLD_ACTUAL - usedLimit)
|
||||
return Math.min(remainingLimit, availableBalance)
|
||||
return Math.max(0, Math.min(remainingLimit, availableBalance))
|
||||
})
|
||||
|
||||
const paymentOptions = computed<PaymentOption[]>(() => {
|
||||
@@ -486,7 +486,10 @@ export function createWithdrawContext(
|
||||
}
|
||||
|
||||
const merchantMethods = tremendousMethods.filter(
|
||||
(m) => m.category === 'merchant_card' || m.category === 'merchant_cards',
|
||||
(m) =>
|
||||
m.category === 'merchant_card' ||
|
||||
m.category === 'merchant_cards' ||
|
||||
m.category === 'visa_card',
|
||||
)
|
||||
if (merchantMethods.length > 0) {
|
||||
options.push({
|
||||
|
||||
Reference in New Issue
Block a user