diff options
author | Sebastian <sebasjm@gmail.com> | 2023-01-15 17:48:41 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-01-15 17:48:41 -0300 |
commit | fc38d0da958323b994d2e4f8a8f2e9632865557f (patch) | |
tree | 46a03b93095fe6f69b78fd3d15b20926c65f94a8 /packages/taler-wallet-core/src/operations/transactions.ts | |
parent | e034f1045c48a4965490e600122e38f5304ad8da (diff) | |
download | wallet-core-fc38d0da958323b994d2e4f8a8f2e9632865557f.tar.xz |
query transaction status for deposit
Diffstat (limited to 'packages/taler-wallet-core/src/operations/transactions.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/transactions.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/operations/transactions.ts b/packages/taler-wallet-core/src/operations/transactions.ts index a702fab2f..0e86c77ed 100644 --- a/packages/taler-wallet-core/src/operations/transactions.ts +++ b/packages/taler-wallet-core/src/operations/transactions.ts @@ -53,6 +53,7 @@ import { WalletContractData, PeerPushPaymentInitiationStatus, PeerPullPaymentIncomingStatus, + TransactionStatus, } from "../db.js"; import { InternalWalletState } from "../internal-wallet-state.js"; import { assertUnreachable } from "../util/assertUnreachable.js"; @@ -552,6 +553,13 @@ function buildTransactionForDeposit( TransactionType.Deposit, dg.depositGroupId, ), + wireTransferProgress: + (100 * + dg.transactionPerCoin.reduce( + (prev, cur) => prev + (cur === TransactionStatus.Wired ? 1 : 0), + 0, + )) / + dg.transactionPerCoin.length, depositGroupId: dg.depositGroupId, ...(ort?.lastError ? { error: ort.lastError } : {}), }; |