Skip to content

Commit

Permalink
prevent "Port at index 0 is already neutered"
Browse files Browse the repository at this point in the history
  • Loading branch information
turbocrime committed Aug 26, 2024
1 parent b30e260 commit 25acfc6
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ class PraxInjection {
* @todo Remove when bundled frontends are updated beyond `a31d54a`
* @issue https://github.com/prax-wallet/web/issues/175
*/
request: () => this.postConnectRequest().then(() => Promise.resolve()),
request: async () => {
await Promise.resolve(this.port ?? this.postConnectRequest());
},

connect: () => Promise.resolve(this.port ?? this.postConnectRequest()),
disconnect: () => this.postDisconnectRequest(),
Expand Down

0 comments on commit 25acfc6

Please sign in to comment.