Skip to content

Commit

Permalink
fix(): signTypedData_v4 for metamask
Browse files Browse the repository at this point in the history
  • Loading branch information
midgerate committed Jun 25, 2022
1 parent 7573fa9 commit d42c75d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/providers/web3-provider/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,12 @@ class WalletConnectProvider extends ProviderEngine {
return;
}

return this.sendAsyncPromise(payload.method, payload.params);
if(payload.method === "eth_signTypedData_v4" && this.walletMeta?.name === "MetaMask") {
const { result } = await this.handleOtherRequests(payload);
return result
} else {
return this.sendAsyncPromise(payload.method, payload.params);
}
};

onConnect = (callback: any) => {
Expand Down

0 comments on commit d42c75d

Please sign in to comment.