Skip to content

Commit

Permalink
fixes wallet disconnection
Browse files Browse the repository at this point in the history
  • Loading branch information
creed-victor committed Dec 10, 2020
1 parent 72421e3 commit a3b9894
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/utils/sovryn/sovryn-network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export class SovrynNetwork {
} catch (e) {
console.error('connect fails.');
console.error(e);
this.disconnect();
return false;
}
}
Expand All @@ -105,6 +106,7 @@ export class SovrynNetwork {
} catch (e) {
console.error('connectTo fails.');
console.error(e);
this.disconnect();
return false;
}
}
Expand Down Expand Up @@ -294,7 +296,7 @@ export class SovrynNetwork {
try {
if (provider.on) {
provider.on('close', () => {
this.store().dispatch(actions.disconnect());
this.disconnect();
});
provider.on('error', error => {
console.error('provider error', error);
Expand Down Expand Up @@ -349,7 +351,7 @@ export class SovrynNetwork {
} catch (e) {
console.error('connect provider fails.');
console.error(e);
this.store().dispatch(actions.disconnect());
this.disconnect();
}
}

Expand Down

0 comments on commit a3b9894

Please sign in to comment.