commit a3317d6a37f3b90b76026e9a058ae08d39b88766 parent 9d69f4e407c382c05d9f89dea82724021bc53e0b Author: Iván Ávalos <avalos@disroot.org> Date: Tue, 1 Jul 2025 15:48:46 +0200 wallet-core: store currency after confirmPay Diffstat:
| M | packages/taler-wallet-core/src/pay-merchant.ts | | | 6 | ++++++ |
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/packages/taler-wallet-core/src/pay-merchant.ts b/packages/taler-wallet-core/src/pay-merchant.ts @@ -2845,6 +2845,12 @@ export async function confirmPay( ); p.choiceIndex = choiceIndex; + if (p.download && choiceIndex !== undefined && + contractData.version === MerchantContractVersion.V1 + ) { + const amount = contractData.choices[choiceIndex].amount; + p.download.currency = Amounts.currencyOf(amount); + } const oldTxState = computePayMerchantTransactionState(p); switch (p.purchaseStatus) {