From 5e7812d63e3e51dbcc9d0d313a3074f9d5d16478 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 1 Sep 2022 08:42:18 -0300 Subject: show sharing action when the tx is not completed --- .../src/wallet/Transaction.tsx | 69 ++++++++++++++++++---- 1 file changed, 58 insertions(+), 11 deletions(-) (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 c8c4e3ae1..44543c2cd 100644 --- a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx @@ -115,6 +115,9 @@ export function TransactionPage({ tid, goToWalletHistory }: Props): VNode { return ( { + null; + }} onDelete={() => wxApi.deleteTransaction(tid).then(() => goToWalletHistory(currency)) } @@ -129,6 +132,7 @@ export function TransactionPage({ tid, goToWalletHistory }: Props): VNode { export interface WalletTransactionProps { transaction: Transaction; + onSend: () => Promise; onDelete: () => Promise; onRetry: () => Promise; onRefund: (id: string) => Promise; @@ -147,6 +151,7 @@ export function TransactionView({ transaction, onDelete, onRetry, + onSend, onRefund, }: WalletTransactionProps): VNode { const [confirmBeforeForget, setConfirmBeforeForget] = useState(false); @@ -169,6 +174,10 @@ export function TransactionView({ }: { children: ComponentChildren; }): VNode { + const showSend = + (transaction.type === TransactionType.PeerPullCredit || + transaction.type === TransactionType.PeerPushDebit) && + !transaction.info.completed; const showRetry = transaction.error !== undefined || transaction.timestamp.t_s === "never" || @@ -194,7 +203,13 @@ export function TransactionView({
{children}