Skip to content

Commit c42fff9

Browse files
authored
Merge pull request #1337 from peanutprotocol/hot-fix/withdraw-unavailable
chore: withdraw temp unavaillable for non-euro sepa countries msg
2 parents 5cd7f65 + 05cc0f2 commit c42fff9

1 file changed

Lines changed: 29 additions & 3 deletions

File tree

  • src/app/(mobile-ui)/withdraw/[country]/bank

src/app/(mobile-ui)/withdraw/[country]/bank/page.tsx

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ export default function WithdrawBankPage() {
4040
currency.path?.toLowerCase() === country.toLowerCase()
4141
)?.currencyCode
4242

43+
// non-eur sepa countries that are currently experiencing issues
44+
const isNonEuroSepaCountry = !!(
45+
nonEuroCurrency &&
46+
nonEuroCurrency !== 'EUR' &&
47+
nonEuroCurrency !== 'USD' &&
48+
nonEuroCurrency !== 'MXN'
49+
)
50+
4351
useEffect(() => {
4452
if (!amountToWithdraw) {
4553
// If no amount, go back to main page
@@ -243,9 +251,27 @@ export default function WithdrawBankPage() {
243251
<ExchangeRate accountType={bankAccount.type} nonEuroCurrency={nonEuroCurrency} />
244252
<PaymentInfoRow hideBottomBorder label="Fee" value={`$ 0.00`} />
245253
</Card>
254+
255+
{isNonEuroSepaCountry && (
256+
<div className="rounded-sm border border-yellow-500 bg-yellow-50 p-4">
257+
<div className="flex items-start gap-3">
258+
<div className="mt-0.5 text-xl">⚠️</div>
259+
<div className="flex-1">
260+
<p className="text-sm font-semibold text-yellow-800">
261+
Service Temporarily Unavailable
262+
</p>
263+
<p className="mt-1 text-xs text-yellow-700">
264+
Withdrawals to {nonEuroCurrency} bank accounts are temporarily unavailable.
265+
Please try again later.
266+
</p>
267+
</div>
268+
</div>
269+
</div>
270+
)}
271+
246272
{error.showError ? (
247273
<Button
248-
disabled={isLoading}
274+
disabled={isLoading || isNonEuroSepaCountry}
249275
onClick={handleCreateAndInitiateOfframp}
250276
loading={isLoading}
251277
shadowSize="4"
@@ -262,10 +288,10 @@ export default function WithdrawBankPage() {
262288
iconSize={12}
263289
shadowSize="4"
264290
onClick={handleCreateAndInitiateOfframp}
265-
disabled={isLoading || !bankAccount}
291+
disabled={isLoading || !bankAccount || isNonEuroSepaCountry}
266292
className="w-full"
267293
>
268-
Withdraw
294+
{isNonEuroSepaCountry ? 'Temporarily Unavailable' : 'Withdraw'}
269295
</Button>
270296
)}
271297
{error.showError && <ErrorAlert description={error.errorMessage} />}

0 commit comments

Comments
 (0)