gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated: move skipDefaults to wallet c


From: gnunet
Subject: [taler-wallet-core] branch master updated: move skipDefaults to wallet config
Date: Mon, 23 Oct 2023 16:30:59 +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 51cf41808 move skipDefaults to wallet config
51cf41808 is described below

commit 51cf4180827f4560df954744f724f0bfc5d29a20
Author: Florian Dold <florian@dold.me>
AuthorDate: Mon Oct 23 16:30:56 2023 +0200

    move skipDefaults to wallet config
---
 packages/taler-wallet-core/src/wallet-api-types.ts |  1 +
 packages/taler-wallet-core/src/wallet.ts           | 13 +++++++------
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/packages/taler-wallet-core/src/wallet-api-types.ts 
b/packages/taler-wallet-core/src/wallet-api-types.ts
index daffd40ac..3741105a4 100644
--- a/packages/taler-wallet-core/src/wallet-api-types.ts
+++ b/packages/taler-wallet-core/src/wallet-api-types.ts
@@ -285,6 +285,7 @@ export interface WalletConfig {
     devModeActive: boolean;
     insecureTrustExchange: boolean;
     preventThrottling: boolean;
+    skipDefaults: boolean;
   };
 
   /**
diff --git a/packages/taler-wallet-core/src/wallet.ts 
b/packages/taler-wallet-core/src/wallet.ts
index 3d392583f..79e4cf1a1 100644
--- a/packages/taler-wallet-core/src/wallet.ts
+++ b/packages/taler-wallet-core/src/wallet.ts
@@ -932,9 +932,9 @@ async function dumpCoins(ws: InternalWalletState): 
Promise<CoinDumpJson> {
           ageCommitmentProof: c.ageCommitmentProof,
           spend_allocation: c.spendAllocation
             ? {
-              amount: c.spendAllocation.amount,
-              id: c.spendAllocation.id,
-            }
+                amount: c.spendAllocation.amount,
+                id: c.spendAllocation.id,
+              }
             : undefined,
         });
       }
@@ -1064,7 +1064,7 @@ async function dispatchRequestInternal<Op extends 
WalletApiOperation>(
     case WalletApiOperation.InitWallet: {
       logger.trace("initializing wallet");
       ws.initCalled = true;
-      if (typeof payload === "object" && (payload as any).skipDefaults) {
+      if (ws.config.testing.skipDefaults) {
         logger.trace("skipping defaults");
       } else {
         logger.trace("filling defaults");
@@ -1278,8 +1278,8 @@ async function dispatchRequestInternal<Op extends 
WalletApiOperation>(
         url.templateParams.amount !== undefined &&
         typeof url.templateParams.amount === "string"
       ) {
-        templateDetails.amount =
-          (req.templateParams.amount ?? url.templateParams.amount) as 
AmountString | undefined;
+        templateDetails.amount = (req.templateParams.amount ??
+          url.templateParams.amount) as AmountString | undefined;
       }
       if (
         url.templateParams.summary !== undefined &&
@@ -1751,6 +1751,7 @@ export class Wallet {
       devModeActive: false,
       insecureTrustExchange: false,
       denomselAllowLate: false,
+      skipDefaults: false,
     },
   };
 

-- 
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]