diff options
author | Sebastian <sebasjm@gmail.com> | 2023-06-01 14:26:28 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-06-01 14:26:28 -0300 |
commit | 4f726b73e66535a69a961da30cf3dcddbbbd9efc (patch) | |
tree | 97ae4e120a2724a851a780da9714c448080a373b /packages/taler-wallet-webextension/src/wallet/Transaction.tsx | |
parent | 699a7b453b90a117776dbb64a09f4c8b312acd04 (diff) | |
download | wallet-core-4f726b73e66535a69a961da30cf3dcddbbbd9efc.tar.xz |
tx state ui
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/Transaction.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/Transaction.tsx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx index eb2325e7a..7b4cf964f 100644 --- a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx @@ -52,6 +52,7 @@ import { QR } from "../components/QR.js"; import { ShowFullContractTermPopup } from "../components/ShowFullContractTermPopup.js"; import { CenteredDialog, + ErrorBox, InfoBox, ListOfProducts, Overlay, @@ -128,7 +129,7 @@ export function TransactionPage({ tid, goToWalletHistory }: Props): VNode { goToWalletHistory(currency); }} onResume={async () => { - await api.wallet.call(WalletApiOperation.SuspendTransaction, { + await api.wallet.call(WalletApiOperation.ResumeTransaction, { transactionId, }); goToWalletHistory(currency); @@ -239,6 +240,7 @@ function TransactionTemplate({ transaction.txState.major === TransactionMajorState.Aborting; const showRetry = + !isFinalState && transaction.txState.major !== TransactionMajorState.Pending && transaction.txState.major !== TransactionMajorState.Aborting; @@ -289,6 +291,16 @@ function TransactionTemplate({ <i18n.Translate>This transaction is not completed</i18n.Translate> </WarningBox> )} + {transaction.txState.major === TransactionMajorState.Aborted && ( + <InfoBox> + <i18n.Translate>This transaction was aborted</i18n.Translate> + </InfoBox> + )} + {transaction.txState.major === TransactionMajorState.Failed && ( + <ErrorBox> + <i18n.Translate>This transaction failed</i18n.Translate> + </ErrorBox> + )} {confirmBeforeForget ? ( <Overlay> <CenteredDialog> |