don't show wrong balance

This commit is contained in:
Florian Dold 2019-09-01 22:59:48 +02:00
parent 4fd092e7e3
commit 82591a9ba9
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
2 changed files with 5 additions and 2 deletions

View File

@ -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) {

View File

@ -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);