From 4f726b73e66535a69a961da30cf3dcddbbbd9efc Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 1 Jun 2023 14:26:28 -0300 Subject: tx state ui --- .../taler-wallet-webextension/src/wallet/Transaction.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'packages/taler-wallet-webextension/src/wallet/Transaction.tsx') 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({ This transaction is not completed )} + {transaction.txState.major === TransactionMajorState.Aborted && ( + + This transaction was aborted + + )} + {transaction.txState.major === TransactionMajorState.Failed && ( + + This transaction failed + + )} {confirmBeforeForget ? ( -- cgit v1.2.3