safe-react/config/jest/Web3Mock.js
nicolas c9a06ec1c2
Handle console erros and warnings (#1709)
* Remove Warning: React.createFactory() is deprecated

* make TS recognize Window definition by adding an empty export

* Silent MM warning  ethereum.autoRefreshOnNetworkChange

* remove warning when requesting data from contract with null address.
2020-12-11 19:38:16 +01:00

8 lines
188 B
JavaScript

import Web3 from 'web3'
const window = global.window || {}
window.web3 = {}
window.web3.currentProvider = new Web3.providers.HttpProvider('http://localhost:8545')
global.window = window