From f281803f1e555b8e8c1e76612b1f6b7128033cd6 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Wed, 10 May 2023 13:35:18 -0300
Subject: compile again after DD37 impl

---
 .../src/components/TransactionItem.tsx             | 29 ++++++++++++----------
 1 file changed, 16 insertions(+), 13 deletions(-)

(limited to 'packages/taler-wallet-webextension/src/components/TransactionItem.tsx')

diff --git a/packages/taler-wallet-webextension/src/components/TransactionItem.tsx b/packages/taler-wallet-webextension/src/components/TransactionItem.tsx
index 9af768641..eda190110 100644
--- a/packages/taler-wallet-webextension/src/components/TransactionItem.tsx
+++ b/packages/taler-wallet-webextension/src/components/TransactionItem.tsx
@@ -22,7 +22,7 @@ import {
   Transaction,
   TransactionType,
   WithdrawalType,
-  ExtendedStatus,
+  TransactionMajorState,
 } from "@gnu-taler/taler-util";
 import { h, VNode } from "preact";
 import { useTranslationContext } from "@gnu-taler/web-util/browser";
@@ -42,6 +42,9 @@ import { Time } from "./Time.js";
 export function TransactionItem(props: { tx: Transaction }): VNode {
   const tx = props.tx;
   const { i18n } = useTranslationContext();
+  /**
+   *
+   */
   switch (tx.type) {
     case TransactionType.Withdrawal:
       return (
@@ -53,7 +56,7 @@ export function TransactionItem(props: { tx: Transaction }): VNode {
           timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)}
           iconPath={"W"}
           pending={
-            tx.extendedStatus === ExtendedStatus.Pending
+            tx.txState.major === TransactionMajorState.Pending
               ? tx.withdrawalDetails.type ===
                 WithdrawalType.TalerBankIntegrationApi
                 ? !tx.withdrawalDetails.confirmed
@@ -77,7 +80,7 @@ export function TransactionItem(props: { tx: Transaction }): VNode {
           timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)}
           iconPath={"P"}
           pending={
-            tx.extendedStatus === ExtendedStatus.Pending
+            tx.txState.major === TransactionMajorState.Pending
               ? i18n.str`Payment in progress`
               : undefined
           }
@@ -89,12 +92,12 @@ export function TransactionItem(props: { tx: Transaction }): VNode {
           id={tx.transactionId}
           amount={tx.amountEffective}
           debitCreditIndicator={"credit"}
-          subtitle={tx.info.summary}
-          title={tx.info.merchant.name}
+          subtitle={"tx.info.summary"} //FIXME: DD37 wallet-core is not returning this value
+          title={"tx.info.merchant.name"} //FIXME: DD37 wallet-core is not returning this value
           timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)}
           iconPath={"R"}
           pending={
-            tx.extendedStatus === ExtendedStatus.Pending
+            tx.txState.major === TransactionMajorState.Pending
               ? i18n.str`Executing refund...`
               : undefined
           }
@@ -110,7 +113,7 @@ export function TransactionItem(props: { tx: Transaction }): VNode {
           timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)}
           iconPath={"T"}
           pending={
-            tx.extendedStatus === ExtendedStatus.Pending
+            tx.txState.major === TransactionMajorState.Pending
               ? i18n.str`Grabbing the tipping...`
               : undefined
           }
@@ -126,7 +129,7 @@ export function TransactionItem(props: { tx: Transaction }): VNode {
           timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)}
           iconPath={"R"}
           pending={
-            tx.extendedStatus === ExtendedStatus.Pending
+            tx.txState.major === TransactionMajorState.Pending
               ? i18n.str`Refreshing coins...`
               : undefined
           }
@@ -142,7 +145,7 @@ export function TransactionItem(props: { tx: Transaction }): VNode {
           timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)}
           iconPath={"D"}
           pending={
-            tx.extendedStatus === ExtendedStatus.Pending
+            tx.txState.major === TransactionMajorState.Pending
               ? i18n.str`Deposit in progress`
               : undefined
           }
@@ -158,7 +161,7 @@ export function TransactionItem(props: { tx: Transaction }): VNode {
           timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)}
           iconPath={"I"}
           pending={
-            tx.extendedStatus === ExtendedStatus.Pending
+            tx.txState.major === TransactionMajorState.Pending
               ? i18n.str`Waiting to be paid`
               : undefined
           }
@@ -174,7 +177,7 @@ export function TransactionItem(props: { tx: Transaction }): VNode {
           timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)}
           iconPath={"I"}
           pending={
-            tx.extendedStatus === ExtendedStatus.Pending
+            tx.txState.major === TransactionMajorState.Pending
               ? i18n.str`Payment in progress`
               : undefined
           }
@@ -190,7 +193,7 @@ export function TransactionItem(props: { tx: Transaction }): VNode {
           timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)}
           iconPath={"T"}
           pending={
-            tx.extendedStatus === ExtendedStatus.Pending
+            tx.txState.major === TransactionMajorState.Pending
               ? i18n.str`Receiving the transfer`
               : undefined
           }
@@ -206,7 +209,7 @@ export function TransactionItem(props: { tx: Transaction }): VNode {
           timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)}
           iconPath={"T"}
           pending={
-            tx.extendedStatus === ExtendedStatus.Pending
+            tx.txState.major === TransactionMajorState.Pending
               ? i18n.str`Waiting to be received`
               : undefined
           }
-- 
cgit v1.2.3

