1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-11-14 17:24:51 +01:00
market/tests/unit/__mocks__/web3.ts
2020-05-07 09:03:30 +03:00

21 lines
476 B
TypeScript

export const addresses = ['0x0000000011111111aaaaaaaabbbbbbbb22222222']
export const balances = {
[addresses[0]]: '1122'
}
export default {
eth: {
getChainId: () => Promise.resolve(846353),
getAccounts: () => {
return Promise.resolve(addresses)
},
getBalance: (address: string) => Promise.resolve(balances[address]),
personal: {
sign: () => Promise.resolve('xxxxxxxxxxxx')
}
},
utils: {
fromWei: () => null as any
}
} as any