summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-05-24 12:58:33 +0200
committerFlorian Dold <florian@dold.me>2023-05-24 12:58:33 +0200
commit4627c0781c982421585e4adf9e3320b56f644965 (patch)
treec2e490facc3dcd5b716e046aeaf2cafb549ba94b /packages/taler-wallet-core/src
parentea953f2b772b07780b94daecdefde6cd253a7e90 (diff)
downloadwallet-core-4627c0781c982421585e4adf9e3320b56f644965.tar.gz
wallet-core-4627c0781c982421585e4adf9e3320b56f644965.tar.bz2
wallet-core-4627c0781c982421585e4adf9e3320b56f644965.zip
wallet-core: report number of coins in withdrawal details
Diffstat (limited to 'packages/taler-wallet-core/src')
-rw-r--r--packages/taler-wallet-core/src/wallet.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts
index 6009ff096..da9445602 100644
--- a/packages/taler-wallet-core/src/wallet.ts
+++ b/packages/taler-wallet-core/src/wallet.ts
@@ -1107,12 +1107,17 @@ async function dispatchRequestInternal<Op extends WalletApiOperation>(
Amounts.parseOrThrow(req.amount),
req.restrictAge,
);
+ let numCoins = 0;
+ for (const x of wi.selectedDenoms.selectedDenoms) {
+ numCoins += x.count;
+ }
const resp: ManualWithdrawalDetails = {
amountRaw: req.amount,
amountEffective: Amounts.stringify(wi.selectedDenoms.totalCoinValue),
paytoUris: wi.exchangePaytoUris,
tosAccepted: wi.termsOfServiceAccepted,
ageRestrictionOptions: wi.ageRestrictionOptions,
+ numCoins,
};
return resp;
}