Skip to content

Commit

Permalink
fix: promise leak by capturing rejection from axios
Browse files Browse the repository at this point in the history
  • Loading branch information
alexruzenhack committed Oct 26, 2023
1 parent 29ca737 commit 7fc4c70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/new/wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -1312,8 +1312,8 @@ class HathorWallet extends EventEmitter {
this.walletStopped = false;
this.setState(HathorWallet.CONNECTING);

const info = await new Promise(resolve => {
versionApi.getVersion(resolve);
const info = await new Promise((resolve , reject)=> {
versionApi.getVersion(resolve).catch((error) => reject(error));
});
if (info.network.indexOf(this.conn.network) >= 0) {
this.storage.setApiVersion(info);
Expand Down

0 comments on commit 7fc4c70

Please sign in to comment.