taler-typescript-core

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

commit 4b9479a0a59a7fafbfc1851c7a75a7b15f582008
parent 00e3ab24e82fed54650bec9e9f37e53de524c780
Author: Florian Dold <florian@dold.me>
Date:   Fri, 29 May 2026 15:23:19 +0200

adapt to libeufin prepared transfer API changes

Diffstat:
Mpackages/taler-harness/src/integrationtests/test-prepared-transfer.ts | 4+++-
Mpackages/taler-harness/src/integrationtests/test-withdrawal-shorten.ts | 2+-
Mpackages/taler-util/src/types-taler-prepared-transfer.ts | 3+++
Mpackages/taler-wallet-core/src/withdraw.ts | 1+
4 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/packages/taler-harness/src/integrationtests/test-prepared-transfer.ts b/packages/taler-harness/src/integrationtests/test-prepared-transfer.ts @@ -57,7 +57,7 @@ export async function runPreparedTransferTest(t: GlobalTestState) { const bankClient = new TalerCoreBankHttpClient(bank.corebankApiBaseUrl); const preparedClient = new TalerPreparedTransferHttpClient( - `${bank.corebankApiBaseUrl}accounts/${exchangeBankUsername}/taler-prepared-transfer/`, + `${bank.corebankApiBaseUrl}taler-prepared-transfer/`, ); const wireGatewayApiClient = new TalerWireGatewayHttpClient( `${bank.corebankApiBaseUrl}accounts/${exchangeBankUsername}/taler-wire-gateway/`, @@ -88,6 +88,7 @@ export async function runPreparedTransferTest(t: GlobalTestState) { const reserve_keypair = await cryptoApi.createEddsaKeypair({}); succeedOrThrow( await preparedClient.register({ + credit_account: exchangePaytoUri, credit_amount: "TESTKUDOS:10", type: "reserve", alg: "EdDSA", @@ -133,6 +134,7 @@ export async function runPreparedTransferTest(t: GlobalTestState) { ); succeedOrThrow( await preparedClient.register({ + credit_account: exchangePaytoUri, credit_amount: "TESTKUDOS:10", type: "reserve", alg: "EdDSA", diff --git a/packages/taler-harness/src/integrationtests/test-withdrawal-shorten.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-shorten.ts @@ -71,7 +71,7 @@ export async function runWithdrawalShortenTest(t: GlobalTestState) { ).href; const prepBaseUrl = - bank.corebankApiBaseUrl + "/accounts/exchange/taler-prepared-transfer/"; + bank.corebankApiBaseUrl + "/taler-prepared-transfer/"; const exchangeBankAccount: HarnessExchangeBankAccount = { wireGatewayApiBaseUrl, diff --git a/packages/taler-util/src/types-taler-prepared-transfer.ts b/packages/taler-util/src/types-taler-prepared-transfer.ts @@ -63,6 +63,8 @@ export interface PreparedTransferConfig { } export interface RegistrationRequest { + credit_account: string; + // Amount to transfer credit_amount: AmountString; @@ -172,6 +174,7 @@ export const codecForRegistrationRequest = codecForConstString("kyc"), ), ) + .property("credit_account", codecForString()) .property("alg", codecForEither(codecForConstString("EdDSA"))) .property("account_pub", codecForEddsaPublicKey()) .property("authorization_pub", codecForEddsaPublicKey()) diff --git a/packages/taler-wallet-core/src/withdraw.ts b/packages/taler-wallet-core/src/withdraw.ts @@ -4208,6 +4208,7 @@ async function fetchAccount( const mySig = eddsaSign(decodeCrock(reservePub), decodeCrock(reservePriv)); const resp = succeedOrThrow( await prepClient.register({ + credit_account: acct.payto_uri, account_pub: reservePub, alg: "EdDSA", authorization_pub: reservePub,