[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] 01/02: bump DB
From: |
gnunet |
Subject: |
[taler-wallet-core] 01/02: bump DB |
Date: |
Mon, 20 Jul 2020 10:52:43 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository wallet-core.
commit 616973952533990aa19384dcc46b1ad47c9468a1
Author: Florian Dold <florian.dold@gmail.com>
AuthorDate: Mon Jul 20 12:46:32 2020 +0530
bump DB
---
src/db.ts | 2 +-
src/operations/withdraw.ts | 16 ++++------------
2 files changed, 5 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/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.