fix refresh, re-fetch /keys before refresh

This commit is contained in:
Florian Dold 2016-10-18 02:11:41 +02:00
parent 6b51e3e48f
commit bb10d36244

View File

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