commit bb10d36244d022b4dcd26a52cb15e37a0a7351a4
parent 6b51e3e48f7e0d9bc0ef7b3d64ae7176bd8ce9b4
Author: Florian Dold <florian.dold@gmail.com>
Date: Tue, 18 Oct 2016 02:11:41 +0200
fix refresh, re-fetch /keys before refresh
Diffstat:
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git 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