From 100821e34c6bcb16eaab9855e46600c5ed49cba1 Mon Sep 17 00:00:00 2001 From: Sinclair Chen Date: Tue, 3 May 2022 13:36:54 -0700 Subject: [PATCH] Ask user to buy more mana when insufficient funds (#124) --- web/components/amount-input.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/web/components/amount-input.tsx b/web/components/amount-input.tsx index 783d8f19..d4724c2a 100644 --- a/web/components/amount-input.tsx +++ b/web/components/amount-input.tsx @@ -8,6 +8,7 @@ import { Bet } from '../../common/bet' import { Spacer } from './layout/spacer' import { calculateCpmmSale } from '../../common/calculate-cpmm' import { Binary, CPMM, FullContract } from '../../common/contract' +import { SiteLink } from './site-link' export function AmountInput(props: { amount: number | undefined @@ -65,7 +66,16 @@ export function AmountInput(props: { {error && (
- {error} + {error === 'Insufficient balance' ? ( + <> + Not enough funds. + + Buy more? + + + ) : ( + error + )}
)}