You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to follow the web3 integration cookbook receipt in Typescript:
this.provider = new eth.providers.Web3Provider(opts.web3.currentProvider)
Where opts.web3 is an instance of a more recent web3.js release > 1.0.0-beta.37
I get an error while transpiling:
src/Wallet.ts:34:54 - error TS2345: Argument of type 'Web3EthereumProvider | HttpProvider | IpcProvider | WebsocketProvider | CustomProvider' is not assignable to parameter of type 'AsyncSendable'.
Type 'Web3EthereumProvider' is not assignable to type 'AsyncSendable'.
Types of property 'send' are incompatible.
Type '(method: string, parameters: any[]) => Promise<any>' is not assignable to type '(request: any, callback: (error: any, response: any) => void) => void'.
Types of parameters 'parameters' and 'callback' are incompatible.
Type '(error: any, response: any) => void' is missing the following properties from type 'any[]': pop, push, concat, join, and 25 more.
34 this.provider = new eth.providers.Web3Provider(opts.web3.currentProvider)
~~~~~~~~~~~~~~~~~~~~~~~~~
Looks like web3.js HttpProvider got up upgraded interface in versions >= 1.0.0-beta.38:
I'm trying to follow the web3 integration cookbook receipt in Typescript:
this.provider = new eth.providers.Web3Provider(opts.web3.currentProvider)
Where
opts.web3
is an instance of a more recent web3.js release > 1.0.0-beta.37I get an error while transpiling:
Looks like web3.js HttpProvider got up upgraded interface in versions >= 1.0.0-beta.38:
And
ethers.providers.Web3Provider
is expecting an AsyncSendable w an interface:Looks like web3's new interface is specced out in EPI-1193 and issue #235 mentioned this.
Using ethers version
^4.0.27
The text was updated successfully, but these errors were encountered: