[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] 02/04: fix withdraw redirect when there is no enough
From: |
gnunet |
Subject: |
[taler-wallet-core] 02/04: fix withdraw redirect when there is no enough balance |
Date: |
Mon, 21 Mar 2022 16:49:51 +0100 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository wallet-core.
commit fac550d45494b8c00e833cdbfbc6e0714222cd4a
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Mon Mar 21 09:58:05 2022 -0300
fix withdraw redirect when there is no enough balance
---
packages/taler-wallet-webextension/src/cta/Pay.tsx | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/packages/taler-wallet-webextension/src/cta/Pay.tsx
b/packages/taler-wallet-webextension/src/cta/Pay.tsx
index de0978ac..2a0d1b46 100644
--- a/packages/taler-wallet-webextension/src/cta/Pay.tsx
+++ b/packages/taler-wallet-webextension/src/cta/Pay.tsx
@@ -155,7 +155,7 @@ export interface PaymentRequestViewProps {
onClick: () => void;
payErrMsg?: string;
uri: string;
- goToWalletManualWithdraw: () => void;
+ goToWalletManualWithdraw: (s: string) => void;
balance: AmountJson | undefined;
}
export function PaymentRequestView({
@@ -196,8 +196,8 @@ export function PaymentRequestView({
);
}
+ const amountRaw = Amounts.parseOrThrow(payStatus.amountRaw);
if (payStatus.status === PreparePayResultType.PaymentPossible) {
- const amountRaw = Amounts.parseOrThrow(payStatus.amountRaw);
const amountEffective: AmountJson = Amounts.parseOrThrow(
payStatus.amountEffective,
);
@@ -284,7 +284,10 @@ export function PaymentRequestView({
)}
</section>
<section>
- <ButtonSuccess upperCased onClick={goToWalletManualWithdraw}>
+ <ButtonSuccess
+ upperCased
+ onClick={() => goToWalletManualWithdraw(amountRaw.currency)}
+ >
<i18n.Translate>Withdraw digital cash</i18n.Translate>
</ButtonSuccess>
</section>
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.