diff options
author | Florian Dold <florian@dold.me> | 2023-02-14 13:18:33 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-02-14 13:18:33 +0100 |
commit | bb8bf3cb5596fe615359e4b984d6a7f51560e92b (patch) | |
tree | f1805c1be19cfa80afec062c2d634dfd3eb78972 /packages/taler-wallet-core/src | |
parent | b73accfe4a5a328fbbebcc9bdfd9b4740af90058 (diff) | |
download | wallet-core-bb8bf3cb5596fe615359e4b984d6a7f51560e92b.tar.xz |
wallet-core: more details in refresh transaction
Diffstat (limited to 'packages/taler-wallet-core/src')
-rw-r--r-- | packages/taler-wallet-core/src/operations/transactions.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/operations/transactions.ts b/packages/taler-wallet-core/src/operations/transactions.ts index 3cefd2c4d..12037fe0e 100644 --- a/packages/taler-wallet-core/src/operations/transactions.ts +++ b/packages/taler-wallet-core/src/operations/transactions.ts @@ -596,6 +596,11 @@ function buildTransactionForRefresh( default: extendedStatus = ExtendedStatus.Pending; } + const inputAmount = Amounts.sumOrZero( + refreshGroupRecord.currency, + refreshGroupRecord.inputPerCoin, + ).amount; + const outputAmount = Amounts.sumOrZero(refreshGroupRecord.currency, refreshGroupRecord.estimatedOutputPerCoin).amount; return { type: TransactionType.Refresh, refreshReason: refreshGroupRecord.reason, @@ -605,6 +610,8 @@ function buildTransactionForRefresh( amountRaw: Amounts.stringify( Amounts.zeroOfCurrency(refreshGroupRecord.currency), ), + refreshInputAmount: Amounts.stringify(inputAmount), + refreshOutputAmount: Amounts.stringify(outputAmount), extendedStatus: refreshGroupRecord.operationStatus === RefreshOperationStatus.Finished || refreshGroupRecord.operationStatus === |