1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00
market/tests/unit/__mocks__/web3.ts

21 lines
476 B
TypeScript
Raw Normal View History

2020-05-07 08:03:30 +02:00
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