diff options
author | Sebastian <sebasjm@gmail.com> | 2023-05-10 13:35:18 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-05-10 13:35:18 -0300 |
commit | f281803f1e555b8e8c1e76612b1f6b7128033cd6 (patch) | |
tree | a30f1863a5b5ea27c2e382bb0297e9b9e55de572 /packages/taler-wallet-webextension/src/components | |
parent | 6308c7ea6ba195199ee413c6c485321a013a514a (diff) | |
download | wallet-core-f281803f1e555b8e8c1e76612b1f6b7128033cd6.tar.xz |
compile again after DD37 impl
Diffstat (limited to 'packages/taler-wallet-webextension/src/components')
-rw-r--r-- | packages/taler-wallet-webextension/src/components/PendingTransactions.tsx | 4 | ||||
-rw-r--r-- | packages/taler-wallet-webextension/src/components/TransactionItem.tsx | 29 |
2 files changed, 18 insertions, 15 deletions
diff --git a/packages/taler-wallet-webextension/src/components/PendingTransactions.tsx b/packages/taler-wallet-webextension/src/components/PendingTransactions.tsx index 427c4bfee..3866fc991 100644 --- a/packages/taler-wallet-webextension/src/components/PendingTransactions.tsx +++ b/packages/taler-wallet-webextension/src/components/PendingTransactions.tsx @@ -16,9 +16,9 @@ import { AbsoluteTime, Amounts, - ExtendedStatus, NotificationType, Transaction, + TransactionMajorState, } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { Fragment, h, JSX, VNode } from "preact"; @@ -58,7 +58,7 @@ export function PendingTransactions({ goToTransaction }: Props): VNode { !state || state.hasError ? cache.tx : state.response.transactions.filter( - (t) => t.extendedStatus === ExtendedStatus.Pending, + (t) => t.txState.major === TransactionMajorState.Pending, ); if (state && !state.hasError) { 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 } |