only count pending refreshes

This commit is contained in:
Florian Dold 2017-03-10 15:25:54 +01:00
parent 8b62698729
commit 007df45ef9
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
3 changed files with 27 additions and 11 deletions

File diff suppressed because one or more lines are too long

View File

@ -87,3 +87,16 @@ test("withdraw-request", (t: TestLib) => {
t.assert(x.value == 3);
t.pass();
});
test("ecdsa", (t: TestLib) => {
const priv = native.EcdsaPrivateKey.create();
const pub1 = priv.getPublicKey();
t.pass();
});
test("ecdhe", (t: TestLib) => {
const priv = native.EcdhePrivateKey.create();
const pub = priv.getPublicKey();
t.pass();
});

View File

@ -1315,7 +1315,7 @@ export class Wallet {
function collectPendingRefresh(r: RefreshSessionRecord,
balance: WalletBalance) {
if (!r.finished) {
if (r.finished) {
return balance;
}
let entry = ensureEntry(balance, r.valueWithFee.currency);