Adds web3-core types

This commit is contained in:
Agustin Pane 2020-07-08 10:07:38 -03:00
parent 2ea1608d30
commit 8fb5cf5e63
4 changed files with 36 additions and 840 deletions

View File

@ -252,6 +252,7 @@
"truffle": "5.1.29",
"typescript": "^3.9.5",
"wait-on": "5.0.1",
"web3-core": "^1.2.9",
"web3-eth-contract": "^1.2.9",
"web3-utils": "^1.2.8"
}

View File

@ -67,9 +67,9 @@ export const web3ReadOnly =
: new Web3(window.web3?.currentProvider || 'ws://localhost:8545')
let web3 = web3ReadOnly
export const getWeb3 = () => web3
export const getWeb3 = (): Web3 => web3
export const resetWeb3 = () => {
export const resetWeb3 = (): void => {
web3 = web3ReadOnly
}

View File

@ -1,8 +1,9 @@
interface Window {
web3: {
currentProvider: any
import Web3 from 'web3'
declare global {
interface Window {
web3?: Web3
testAccountIndex?: string
}
testAccountIndex: string
}
declare module '@openzeppelin/contracts/build/contracts/ERC721'
declare module 'currency-flags/dist/currency-flags.min.css'

862
yarn.lock

File diff suppressed because it is too large Load Diff