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/wallet/Transaction.tsx | 68 +++++++++++++++++++--- 1 file changed, 61 insertions(+), 7 deletions(-) (limited to 'packages/taler-wallet-webextension/src/wallet') diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx index 217a77575..a9683f680 100644 --- a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx @@ -28,6 +28,7 @@ import { stringifyPaytoUri, TalerProtocolTimestamp, Transaction, + TransactionDeposit, TransactionType, TranslatedString, WithdrawalType, @@ -714,13 +715,24 @@ export function TransactionView({ }} /> ) : transaction.wireTransferProgress === 100 ? ( - + + + + } + kind="neutral" + /> + ) : ( { + const am = Amounts.parseOrThrow(cur.amountEffective); + const sum = !prev[cur.wireTransferId] + ? am + : Amounts.add(prev[cur.wireTransferId], am).amount; + prev[cur.wireTransferId] = sum; + return prev; + }, {} as Record); + const wireTransfers = Object.entries(trackByWtid).map(([id, amountJson]) => ({ + id, + amount: Amounts.stringify(amountJson), + })); + + return ( + + + + Transfer identification + + + Amount + + + + {wireTransfers.map((wire) => ( + + {wire.id} + + + + + ))} + + ); +} function DepositDetails({ amount }: { amount: AmountWithFee }): VNode { const { i18n } = useTranslationContext(); -- cgit v1.2.3