taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 0fb407fe19cfe1b4b1159d0541ce88b70a71687d
parent 448a2bb0a87ae9427bc47002b9e552a7693bfb16
Author: Florian Dold <florian@dold.me>
Date:   Wed, 28 May 2025 17:40:26 +0200

wallet-core: include amount in KYC auth transfer struct

Diffstat:
Mpackages/taler-util/src/types-taler-wallet-transactions.ts | 9+++++++++
Mpackages/taler-wallet-core/src/deposits.ts | 7+++++--
2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/packages/taler-util/src/types-taler-wallet-transactions.ts b/packages/taler-util/src/types-taler-wallet-transactions.ts @@ -323,6 +323,15 @@ export interface KycAuthTransferInfo { accountPub: string; /** + * Amount that the exchange expects to be deposited. + * + * Usually corresponds to the TINY_AMOUNT configuration of the exchange, + * and thus is the smallest amount that can be transferred + * via a bank transfer. + */ + amount: AmountString; + + /** * Possible target payto URIs. */ creditPaytoUris: string[]; diff --git a/packages/taler-wallet-core/src/deposits.ts b/packages/taler-wallet-core/src/deposits.ts @@ -24,6 +24,7 @@ import { AbsoluteTime, AmountJson, + AmountString, Amounts, BatchDepositRequestCoin, CheckDepositRequest, @@ -250,14 +251,16 @@ export class DepositTransactionContext implements TransactionContext { plainCreditPaytoUris.push(acc.payto_uri); } } + // FIXME: Query tiny amount from exchange. + const amount: AmountString = `${dg.currency}:0.01`; kycAuthTransferInfo = { debitPaytoUri: dg.wire.payto_uri, accountPub: dg.merchantPub, + amount, creditPaytoUris: augmentPaytoUrisForKycTransfer( plainCreditPaytoUris, dg.merchantPub, - // FIXME: Query tiny amount from exchange. - `${dg.currency}:0.01`, + amount, ), }; break;