From bb10d36244d022b4dcd26a52cb15e37a0a7351a4 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 18 Oct 2016 02:11:41 +0200 Subject: [PATCH] fix refresh, re-fetch /keys before refresh --- lib/wallet/wallet.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/wallet/wallet.ts b/lib/wallet/wallet.ts index e39b492ed..721d306fd 100644 --- a/lib/wallet/wallet.ts +++ b/lib/wallet/wallet.ts @@ -1188,8 +1188,8 @@ export class Wallet { throw Error("coin not found"); } - let exchange = await this.q().get(Stores.exchanges, - coin.exchangeBaseUrl); + let exchange = await this.updateExchangeFromUrl(coin.exchangeBaseUrl); + if (!exchange) { throw Error("db inconsistent"); } @@ -1242,8 +1242,7 @@ export class Wallet { if (oldSession) { refreshSession = oldSession; } else { - refreshSession = await this.q().get(Stores.refresh, - oldCoinPub); + refreshSession = this.createRefreshSession(oldCoinPub); } if (!refreshSession) { // refreshing not necessary