Skip to content

Commit

Permalink
fix: update to use window.etheruem.request instead of window.etheruem…
Browse files Browse the repository at this point in the history
….send
  • Loading branch information
shanejonas authored Aug 24, 2021
1 parent e5da952 commit aa7b281
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transports/MetaMaskTransport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class MetaMaskTransport extends Transport {
this.uri = uri;
}
public async connect(): Promise<any> {
const results = await (window as any).ethereum.send({
const results = await (window as any).ethereum.request({
method: "wallet_enable",
params: [{
[this.uri]: {},
Expand All @@ -19,7 +19,7 @@ class MetaMaskTransport extends Transport {
}

public async sendData(data: JSONRPCRequestData, timeout: number | undefined = 5000): Promise<any> {
return (window as any).ethereum.send({
return (window as any).ethereum.request({
method: this.uri,
params: [
(data as IJSONRPCData).request,
Expand Down

0 comments on commit aa7b281

Please sign in to comment.