fix withdraw redirect when there is no enough balance
This commit is contained in:
parent
c202abef5e
commit
fac550d454
@ -155,7 +155,7 @@ export interface PaymentRequestViewProps {
|
|||||||
onClick: () => void;
|
onClick: () => void;
|
||||||
payErrMsg?: string;
|
payErrMsg?: string;
|
||||||
uri: string;
|
uri: string;
|
||||||
goToWalletManualWithdraw: () => void;
|
goToWalletManualWithdraw: (s: string) => void;
|
||||||
balance: AmountJson | undefined;
|
balance: AmountJson | undefined;
|
||||||
}
|
}
|
||||||
export function PaymentRequestView({
|
export function PaymentRequestView({
|
||||||
@ -196,8 +196,8 @@ export function PaymentRequestView({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const amountRaw = Amounts.parseOrThrow(payStatus.amountRaw);
|
||||||
if (payStatus.status === PreparePayResultType.PaymentPossible) {
|
if (payStatus.status === PreparePayResultType.PaymentPossible) {
|
||||||
const amountRaw = Amounts.parseOrThrow(payStatus.amountRaw);
|
|
||||||
const amountEffective: AmountJson = Amounts.parseOrThrow(
|
const amountEffective: AmountJson = Amounts.parseOrThrow(
|
||||||
payStatus.amountEffective,
|
payStatus.amountEffective,
|
||||||
);
|
);
|
||||||
@ -284,7 +284,10 @@ export function PaymentRequestView({
|
|||||||
)}
|
)}
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
<ButtonSuccess upperCased onClick={goToWalletManualWithdraw}>
|
<ButtonSuccess
|
||||||
|
upperCased
|
||||||
|
onClick={() => goToWalletManualWithdraw(amountRaw.currency)}
|
||||||
|
>
|
||||||
<i18n.Translate>Withdraw digital cash</i18n.Translate>
|
<i18n.Translate>Withdraw digital cash</i18n.Translate>
|
||||||
</ButtonSuccess>
|
</ButtonSuccess>
|
||||||
</section>
|
</section>
|
||||||
|
Loading…
Reference in New Issue
Block a user