diff options
author | Sebastian <sebasjm@gmail.com> | 2023-02-20 13:24:24 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-02-20 13:24:24 -0300 |
commit | 7bb81a008b7148cfd3fd656f858e4cbd755531ac (patch) | |
tree | e42d866364744b7cd648f1a4160ddf401232668b | |
parent | 5ad96b178ee022199877b89683ceb0e930761b9d (diff) |
tell the user that refund is pending
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/Transaction.tsx | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx index 5fabfcd20..b9b1aa198 100644 --- a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx @@ -607,29 +607,35 @@ export function TransactionView({ ) : undefined} {pendingRefund !== undefined && Amounts.isNonZero(pendingRefund) && ( <InfoBox> - <i18n.Translate> - Merchant created a refund for this order but was not automatically - picked up. - </i18n.Translate> + {transaction.refundQueryActive ? ( + <i18n.Translate>Refund is in progress.</i18n.Translate> + ) : ( + <i18n.Translate> + Merchant created a refund for this order but was not + automatically picked up. + </i18n.Translate> + )} <Part title={i18n.str`Offer`} text={<Amount value={pendingRefund} />} kind="positive" /> - <div> - <div /> + {transaction.refundQueryActive ? undefined : ( <div> - <Button - variant="contained" - onClick={safely( - () => onRefund(transaction.proposalId), - i18n.str`Could not refund`, - )} - > - <i18n.Translate>Accept</i18n.Translate> - </Button> + <div /> + <div> + <Button + variant="contained" + onClick={safely( + () => onRefund(transaction.proposalId), + i18n.str`Could not refund`, + )} + > + <i18n.Translate>Accept</i18n.Translate> + </Button> + </div> </div> - </div> + )} </InfoBox> )} <Part |