ChainSafe / dappeteer

[DEPRECATED]🏌🏼‍E2E testing for dApps using Puppeteer + MetaMask
Other
490 stars 152 forks source link

Return addNetwork and addToken feature. #298

Closed alagiesellu closed 1 year ago

alagiesellu commented 1 year ago

In the previous versions, my project depends on the addNetwork and addToken functions.

Pls, return the features.

mpetrunic commented 1 year ago

Hey there, they are not exactly removed but they are now used differently as they can be initiated from dapp. You can see examples in our tests:

alagiesellu commented 1 year ago

`const addNetworkRequest = window.ethereum.request({ ^

ReferenceError: window is not defined`

This is the error am getting now.

mpetrunic commented 1 year ago

`const addNetworkRequest = window.ethereum.request({ ^

ReferenceError: window is not defined`

This is the error am getting now.

You need to evaluate that code in context of your dapp page: https://github.com/ChainSafe/dappeteer/blob/master/test/basic.spec.ts#L120