From 4f726b73e66535a69a961da30cf3dcddbbbd9efc Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
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({
             <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>
-- 
cgit v1.2.3

