diff options
author | Sebastian <sebasjm@gmail.com> | 2023-05-22 13:14:51 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-05-22 13:14:51 -0300 |
commit | 9181c1e81b32950142943d7e47163c4cd0c260c8 (patch) | |
tree | bb43802d462960e71cce8bd62e1d2e8508a056bf /packages/taler-wallet-webextension/src/wallet/Transaction.tsx | |
parent | 708cf016e4ab1e749b86151aa2a9cc548675d63c (diff) | |
download | wallet-core-9181c1e81b32950142943d7e47163c4cd0c260c8.tar.xz |
fixing txId reference based on nominal type
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/Transaction.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/Transaction.tsx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx index 938d62490..39b070e46 100644 --- a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx @@ -28,6 +28,7 @@ import { TalerProtocolTimestamp, Transaction, TransactionDeposit, + TransactionIdStr, TransactionMajorState, TransactionType, TranslatedString, @@ -74,10 +75,8 @@ interface Props { goToWalletHistory: (currency?: string) => Promise<void>; } -export function TransactionPage({ - tid: transactionId, - goToWalletHistory, -}: Props): VNode { +export function TransactionPage({ tid, goToWalletHistory }: Props): VNode { + const transactionId = tid as TransactionIdStr; //FIXME: validate const { i18n } = useTranslationContext(); const api = useBackendContext(); const state = useAsyncAsHook( @@ -152,7 +151,7 @@ export interface WalletTransactionProps { onCancel: () => Promise<void>; onDelete: () => Promise<void>; onRetry: () => Promise<void>; - onRefund: (id: string) => Promise<void>; + onRefund: (id: TransactionIdStr) => Promise<void>; onBack: () => Promise<void>; } @@ -621,7 +620,7 @@ export function TransactionView({ <Button variant="contained" onClick={safely("refund transaction", () => - onRefund(transaction.proposalId), + onRefund(transaction.transactionId), )} > <i18n.Translate>Accept</i18n.Translate> |