aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-09-01 22:59:48 +0200
committerFlorian Dold <florian.dold@gmail.com>2019-09-01 22:59:48 +0200
commit82591a9ba9751336480ab429886c085786172ec4 (patch)
tree324eba13db4a9e055a0c79660ae159b1649755f5
parent4fd092e7e3c060b8b027e16e44f26cce5fd8c0e8 (diff)
don't show wrong balance
-rw-r--r--src/headless/helpers.ts4
-rw-r--r--src/wallet.ts3
2 files changed, 5 insertions, 2 deletions
diff --git a/src/headless/helpers.ts b/src/headless/helpers.ts
index 6716ccef4..49881d469 100644
--- a/src/headless/helpers.ts
+++ b/src/headless/helpers.ts
@@ -133,9 +133,9 @@ export async function getDefaultNodeWallet(
const myBadge = new ConsoleBadge();
- BridgeIDBFactory.enableTracing = true;
+ BridgeIDBFactory.enableTracing = false;
const myBackend = new MemoryBackend();
- myBackend.enableTracing = true;
+ myBackend.enableTracing = false;
const storagePath = args.persistentStoragePath;
if (storagePath) {
diff --git a/src/wallet.ts b/src/wallet.ts
index 1d231f2df..14ab45444 100644
--- a/src/wallet.ts
+++ b/src/wallet.ts
@@ -2230,10 +2230,13 @@ export class Wallet {
if (!r.timestamp_confirmed) {
return balance;
}
+ let amount = Amounts.getZero(r.requested_amount.currency);
+ /*
let amount = r.current_amount;
if (!amount) {
amount = r.requested_amount;
}
+ */
amount = Amounts.add(amount, r.precoin_amount).amount;
if (Amounts.cmp(smallestWithdraw[r.exchange_base_url], amount) < 0) {
addTo(balance, "pendingIncoming", amount, r.exchange_base_url);