fix refresh, re-fetch /keys before refresh
This commit is contained in:
parent
6b51e3e48f
commit
bb10d36244
@ -1188,8 +1188,8 @@ export class Wallet {
|
|||||||
throw Error("coin not found");
|
throw Error("coin not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
let exchange = await this.q().get<IExchangeInfo>(Stores.exchanges,
|
let exchange = await this.updateExchangeFromUrl(coin.exchangeBaseUrl);
|
||||||
coin.exchangeBaseUrl);
|
|
||||||
if (!exchange) {
|
if (!exchange) {
|
||||||
throw Error("db inconsistent");
|
throw Error("db inconsistent");
|
||||||
}
|
}
|
||||||
@ -1242,8 +1242,7 @@ export class Wallet {
|
|||||||
if (oldSession) {
|
if (oldSession) {
|
||||||
refreshSession = oldSession;
|
refreshSession = oldSession;
|
||||||
} else {
|
} else {
|
||||||
refreshSession = await this.q().get(Stores.refresh,
|
refreshSession = this.createRefreshSession(oldCoinPub);
|
||||||
oldCoinPub);
|
|
||||||
}
|
}
|
||||||
if (!refreshSession) {
|
if (!refreshSession) {
|
||||||
// refreshing not necessary
|
// refreshing not necessary
|
||||||
|
Loading…
Reference in New Issue
Block a user