gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] branch master updated: wallet-core: fix withdrawTest


From: gnunet
Subject: [taler-wallet-core] branch master updated: wallet-core: fix withdrawTestBalance command
Date: Tue, 13 Sep 2022 17:41:50 +0200

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository wallet-core.

The following commit(s) were added to refs/heads/master by this push:
     new 962bfde2 wallet-core: fix withdrawTestBalance command
962bfde2 is described below

commit 962bfde2144609f1911c967d93bbf88945ffe314
Author: Florian Dold <florian@dold.me>
AuthorDate: Tue Sep 13 17:41:47 2022 +0200

    wallet-core: fix withdrawTestBalance command
---
 packages/taler-util/src/walletTypes.ts               |  4 ++--
 packages/taler-wallet-core/src/operations/testing.ts | 12 +++++-------
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/packages/taler-util/src/walletTypes.ts 
b/packages/taler-util/src/walletTypes.ts
index c10e3be4..437ac296 100644
--- a/packages/taler-util/src/walletTypes.ts
+++ b/packages/taler-util/src/walletTypes.ts
@@ -1166,7 +1166,7 @@ export interface WithdrawTestBalanceRequest {
   /**
    * Bank access API base URL.  Defaults to the bankBaseUrl.
    */
-  bankAccessApiBaseUrl: string;
+  bankAccessApiBaseUrl?: string;
   exchangeBaseUrl: string;
   forcedDenomSel?: ForcedDenomSel;
 }
@@ -1245,7 +1245,7 @@ export const codecForWithdrawTestBalance =
       .property("bankBaseUrl", codecForString())
       .property("exchangeBaseUrl", codecForString())
       .property("forcedDenomSel", codecForAny())
-      .property("bankAccessApiBaseUrl", codecForString())
+      .property("bankAccessApiBaseUrl", codecOptional(codecForString()))
       .build("WithdrawTestBalanceRequest");
 
 export interface ApplyRefundResponse {
diff --git a/packages/taler-wallet-core/src/operations/testing.ts 
b/packages/taler-wallet-core/src/operations/testing.ts
index e2a0c7db..598a8850 100644
--- a/packages/taler-wallet-core/src/operations/testing.ts
+++ b/packages/taler-wallet-core/src/operations/testing.ts
@@ -92,19 +92,17 @@ export async function withdrawTestBalance(
 ): Promise<void> {
   const amount = req.amount;
   const exchangeBaseUrl = req.exchangeBaseUrl;
+  const bankAccessApiBaseUrl = req.bankAccessApiBaseUrl ?? req.bankBaseUrl;
 
   logger.trace(
-    `Registered bank user, bank access base url ${req.bankAccessApiBaseUrl}`,
-  );
-  const bankUser = await registerRandomBankUser(
-    ws.http,
-    req.bankAccessApiBaseUrl,
+    `Registered bank user, bank access base url ${bankAccessApiBaseUrl}`,
   );
+  const bankUser = await registerRandomBankUser(ws.http, bankAccessApiBaseUrl);
   logger.trace(`Registered bank user ${JSON.stringify(bankUser)}`);
 
   const wresp = await createDemoBankWithdrawalUri(
     ws.http,
-    req.bankAccessApiBaseUrl,
+    bankAccessApiBaseUrl,
     bankUser,
     amount,
   );
@@ -117,7 +115,7 @@ export async function withdrawTestBalance(
 
   await confirmBankWithdrawalUri(
     ws.http,
-    req.bankAccessApiBaseUrl,
+    bankAccessApiBaseUrl,
     bankUser,
     wresp.withdrawal_id,
   );

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]