aboutsummaryrefslogtreecommitdiff
path: root/extension/background/wallet.js
diff options
context:
space:
mode:
Diffstat (limited to 'extension/background/wallet.js')
-rw-r--r--extension/background/wallet.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/extension/background/wallet.js b/extension/background/wallet.js
index 2c8c11f33..c4216c4de 100644
--- a/extension/background/wallet.js
+++ b/extension/background/wallet.js
@@ -433,6 +433,7 @@ function depleteReserve(db, reserve, mint) {
workList.push(d);
}
if (!found) {
+ console.log("did not find coins for remaining ", remaining.toJson());
break;
}
}
@@ -441,7 +442,6 @@ function depleteReserve(db, reserve, mint) {
if (workList.length == 0) {
return;
}
- console.log("doing work");
let d = workList.pop();
withdraw(db, d, reserve)
.then(() => next());
@@ -578,25 +578,22 @@ function balances(db, detail, sendResponse) {
if (cursor) {
tx.objectStore('denoms').get(cursor.value.denomPub).onsuccess = (e2) => {
let d = e2.target.result;
- console.log("got denom", JSON.stringify(d));
let acc = byCurrency[d.value.currency];
if (!acc) {
acc = new Amount(d.value);
- console.log("initial:", JSON.stringify(acc.toJson()));
byCurrency[d.value.currency] = acc.toJson();
}
else {
let am = new Amount(acc);
am.add(new Amount(d.value));
byCurrency[d.value.currency] = am.toJson();
- console.log("then:", JSON.stringify(am.toJson()));
}
+ console.log("counting", byCurrency[d.value.currency]);
};
cursor.continue();
}
else {
sendResponse(byCurrency);
- console.log("response", JSON.stringify(byCurrency));
}
};
return true;