Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(WalletConnect): fix walletconnect login
The reason behind using `patch-package`: WalletConnect/walletconnect-utils#3
- Loading branch information
Jakub Sydor
committed
Oct 15, 2021
1 parent
358e273
commit 4201fcb
Showing
7 changed files
with
34,404 additions
and
3,392 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
diff --git a/node_modules/@walletconnect/jsonrpc-provider/dist/cjs/provider.js b/node_modules/@walletconnect/jsonrpc-provider/dist/cjs/provider.js | ||
index 86c27ae..4dd3bb8 100644 | ||
--- a/node_modules/@walletconnect/jsonrpc-provider/dist/cjs/provider.js | ||
+++ b/node_modules/@walletconnect/jsonrpc-provider/dist/cjs/provider.js | ||
@@ -48,6 +48,15 @@ class JsonRpcProvider extends jsonrpc_utils_1.IJsonRpcProvider { | ||
reject(e); | ||
} | ||
} | ||
+ this.connection.on("payload", response => { | ||
+ if (response.id !== request.id) return; | ||
+ if (isJsonRpcError(response)) { | ||
+ reject(response.error.message); | ||
+ } | ||
+ else { | ||
+ resolve(response.result); | ||
+ } | ||
+ }); | ||
this.events.on(`${request.id}`, response => { | ||
if (jsonrpc_utils_1.isJsonRpcError(response)) { | ||
reject(response.error.message); | ||
diff --git a/node_modules/@walletconnect/jsonrpc-provider/dist/esm/provider.js b/node_modules/@walletconnect/jsonrpc-provider/dist/esm/provider.js | ||
index 6271b24..f540878 100644 | ||
--- a/node_modules/@walletconnect/jsonrpc-provider/dist/esm/provider.js | ||
+++ b/node_modules/@walletconnect/jsonrpc-provider/dist/esm/provider.js | ||
@@ -37,6 +37,15 @@ export class JsonRpcProvider extends IJsonRpcProvider { | ||
reject(e); | ||
} | ||
} | ||
+ this.connection.on("payload", response => { | ||
+ if (response.id !== request.id) return; | ||
+ if (isJsonRpcError(response)) { | ||
+ reject(response.error.message); | ||
+ } | ||
+ else { | ||
+ resolve(response.result); | ||
+ } | ||
+ }); | ||
this.events.on(`${request.id}`, response => { | ||
if (isJsonRpcError(response)) { | ||
reject(response.error.message); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters