gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated (e3135213 -> e0ee0e39)


From: gnunet
Subject: [taler-wallet-core] branch master updated (e3135213 -> e0ee0e39)
Date: Mon, 20 Jul 2020 10:52:42 +0200

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

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

    from e3135213 remove some printf debugging
     new 61697395 bump DB
     new e0ee0e39 command for confirmPay

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/db.ts                        |  2 +-
 src/headless/taler-wallet-cli.ts | 12 ++++++++++++
 src/operations/withdraw.ts       | 16 ++++------------
 3 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/src/db.ts b/src/db.ts
index ff9ee5a4..5571c869 100644
--- a/src/db.ts
+++ b/src/db.ts
@@ -7,7 +7,7 @@ import { openDatabase, Database, Store, Index } from 
"./util/query";
  * with each major change.  When incrementing the major version,
  * the wallet should import data from the previous version.
  */
-const TALER_DB_NAME = "taler-walletdb-v6";
+const TALER_DB_NAME = "taler-walletdb-v7";
 
 /**
  * Current database minor version, should be incremented
diff --git a/src/headless/taler-wallet-cli.ts b/src/headless/taler-wallet-cli.ts
index 5637732b..3f116670 100644
--- a/src/headless/taler-wallet-cli.ts
+++ b/src/headless/taler-wallet-cli.ts
@@ -520,6 +520,18 @@ advancedCli
     });
   });
 
+advancedCli
+  .subcommand("payConfirm", "pay-confirm", {
+    help: "Confirm payment proposed by a merchant.",
+  })
+  .requiredArgument("proposalId", clk.STRING)
+  .maybeOption("sessionIdOverride", ["--session-id"], clk.STRING)
+  .action(async (args) => {
+    await withWallet(args, async (wallet) => {
+      wallet.confirmPay(args.payConfirm.proposalId, 
args.payConfirm.sessionIdOverride);
+    });
+  });
+
 advancedCli
   .subcommand("refresh", "force-refresh", {
     help: "Force a refresh on a coin.",
diff --git a/src/operations/withdraw.ts b/src/operations/withdraw.ts
index b602aa12..ff618b89 100644
--- a/src/operations/withdraw.ts
+++ b/src/operations/withdraw.ts
@@ -78,11 +78,6 @@ export function getWithdrawDenomList(
   amountAvailable: AmountJson,
   denoms: DenominationRecord[],
 ): DenominationSelectionInfo {
-
-  console.log("calling getWithdrawDenomList with");
-  console.log(JSON.stringify(amountAvailable, undefined, 2));
-  console.log(JSON.stringify(denoms, undefined, 2));
-
   let remaining = Amounts.copy(amountAvailable);
 
   const selectedDenoms: {
@@ -99,7 +94,6 @@ export function getWithdrawDenomList(
   for (const d of denoms) {
     let count = 0;
     const cost = Amounts.add(d.value, d.feeWithdraw).amount;
-    console.log("cost is", Amounts.stringify(cost));
     for (;;) {
       if (Amounts.cmp(remaining, cost) < 0) {
         break;
@@ -120,7 +114,6 @@ export function getWithdrawDenomList(
         count,
         denom: d,
       });
-      console.log("total cost is", Amounts.stringify(totalWithdrawCost));
     }
 
     if (Amounts.isZero(remaining)) {
@@ -154,7 +147,6 @@ export async function getBankWithdrawalInfo(
     );
   }
   const respJson = await resp.json();
-  console.log("resp:", respJson);
 
   const status = codecForWithdrawOperationStatusResponse().decode(respJson);
   return {
@@ -281,7 +273,7 @@ async function processPlanchet(
     throw Error("invariant violated");
   }
   if (planchet.withdrawalDone) {
-    console.log("processPlanchet: planchet already withdrawn");
+    logger.warn("processPlanchet: planchet already withdrawn");
     return;
   }
   const exchange = await ws.db.get(
@@ -289,7 +281,7 @@ async function processPlanchet(
     withdrawalGroup.exchangeBaseUrl,
   );
   if (!exchange) {
-    console.error("db inconsistent: exchange for planchet not found");
+    logger.error("db inconsistent: exchange for planchet not found");
     return;
   }
 
@@ -459,12 +451,12 @@ export async function selectWithdrawalDenoms(
 ): Promise<DenominationSelectionInfo> {
   const exchange = await ws.db.get(Stores.exchanges, exchangeBaseUrl);
   if (!exchange) {
-    console.log("exchange not found");
+    logger.error("exchange not found");
     throw Error(`exchange ${exchangeBaseUrl} not found`);
   }
   const exchangeDetails = exchange.details;
   if (!exchangeDetails) {
-    console.log("exchange details not available");
+    logger.error("exchange details not available");
     throw Error(`exchange ${exchangeBaseUrl} details not available`);
   }
 

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