From 74dba9506dba104d918c5386e67146f71f07436c Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 29 Mar 2023 15:14:02 -0300 Subject: show wire details when the deposit has been wired --- .../src/components/TransactionItem.tsx | 54 ++++++++++++++++++---- 1 file changed, 45 insertions(+), 9 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 934a0fe52..7ddaee9f3 100644 --- a/packages/taler-wallet-webextension/src/components/TransactionItem.tsx +++ b/packages/taler-wallet-webextension/src/components/TransactionItem.tsx @@ -76,7 +76,11 @@ export function TransactionItem(props: { tx: Transaction }): VNode { subtitle={tx.info.summary} timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)} iconPath={"P"} - // pending={tx.pending} + pending={ + tx.extendedStatus === ExtendedStatus.Pending + ? i18n.str`Payment in progress` + : undefined + } /> ); case TransactionType.Refund: @@ -89,7 +93,11 @@ export function TransactionItem(props: { tx: Transaction }): VNode { title={tx.info.merchant.name} timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)} iconPath={"R"} - // pending={tx.pending} + pending={ + tx.extendedStatus === ExtendedStatus.Pending + ? i18n.str`Executing refund...` + : undefined + } /> ); case TransactionType.Tip: @@ -101,7 +109,11 @@ export function TransactionItem(props: { tx: Transaction }): VNode { title={new URL(tx.merchantBaseUrl).hostname} timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)} iconPath={"T"} - // pending={tx.pending} + pending={ + tx.extendedStatus === ExtendedStatus.Pending + ? i18n.str`Grabbing the tipping...` + : undefined + } /> ); case TransactionType.Refresh: @@ -113,7 +125,11 @@ export function TransactionItem(props: { tx: Transaction }): VNode { title={"Refresh"} timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)} iconPath={"R"} - // pending={tx.pending} + pending={ + tx.extendedStatus === ExtendedStatus.Pending + ? i18n.str`Refreshing coins...` + : undefined + } /> ); case TransactionType.Deposit: @@ -125,7 +141,11 @@ export function TransactionItem(props: { tx: Transaction }): VNode { title={tx.targetPaytoUri} timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)} iconPath={"D"} - // pending={tx.pending} + pending={ + tx.extendedStatus === ExtendedStatus.Pending + ? i18n.str`Deposit in progress` + : undefined + } /> ); case TransactionType.PeerPullCredit: @@ -137,7 +157,11 @@ export function TransactionItem(props: { tx: Transaction }): VNode { title={tx.info.summary || "Invoice"} timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)} iconPath={"I"} - // pending={tx.pending} + pending={ + tx.extendedStatus === ExtendedStatus.Pending + ? i18n.str`Waiting to be paid` + : undefined + } /> ); case TransactionType.PeerPullDebit: @@ -149,7 +173,11 @@ export function TransactionItem(props: { tx: Transaction }): VNode { title={tx.info.summary || "Invoice"} timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)} iconPath={"I"} - // pending={tx.pending} + pending={ + tx.extendedStatus === ExtendedStatus.Pending + ? i18n.str`Payment in progress` + : undefined + } /> ); case TransactionType.PeerPushCredit: @@ -161,7 +189,11 @@ export function TransactionItem(props: { tx: Transaction }): VNode { title={tx.info.summary || "Transfer"} timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)} iconPath={"T"} - // pending={tx.pending} + pending={ + tx.extendedStatus === ExtendedStatus.Pending + ? i18n.str`Receiving the transfer` + : undefined + } /> ); case TransactionType.PeerPushDebit: @@ -173,7 +205,11 @@ export function TransactionItem(props: { tx: Transaction }): VNode { title={tx.info.summary || "Transfer"} timestamp={AbsoluteTime.fromTimestamp(tx.timestamp)} iconPath={"T"} - // pending={tx.pending} + pending={ + tx.extendedStatus === ExtendedStatus.Pending + ? i18n.str`Waiting to be received` + : undefined + } /> ); default: { -- cgit v1.2.3