diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-10-18 02:11:41 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-10-18 02:11:41 +0200 |
commit | bb10d36244d022b4dcd26a52cb15e37a0a7351a4 (patch) | |
tree | 596483c26b0a2f751e3fc373d72bea4a0d257d5a | |
parent | 6b51e3e48f7e0d9bc0ef7b3d64ae7176bd8ce9b4 (diff) |
fix refresh, re-fetch /keys before refresh
-rw-r--r-- | lib/wallet/wallet.ts | 7 |
1 files 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<IExchangeInfo>(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 |