mirror of
https://github.com/tornadocash/tornado-initiation-ui.git
synced 2024-11-28 04:30:48 +01:00
fix bug for non-metamask view
This commit is contained in:
parent
18a2da5082
commit
2b6c0a8ba4
@ -9,7 +9,7 @@ const state = () => {
|
||||
|
||||
const getters = {
|
||||
deployerContract: (state, getters, rootState, rootGetters) => (isProxy) => {
|
||||
const web3 = rootGetters['provider/getWeb3']
|
||||
const web3 = rootGetters['provider/currentRpc']
|
||||
return new web3.eth.Contract(
|
||||
deployerABI,
|
||||
isProxy
|
||||
@ -30,7 +30,7 @@ const actions = {
|
||||
dispatch('loading/enable', {}, { root: true })
|
||||
const isProxy = action.domain === 'deployer.contract.tornadocash.eth'
|
||||
const ethAccount = rootGetters['provider/getAccount']
|
||||
const web3 = rootGetters['provider/getWeb3']
|
||||
const web3 = rootGetters['provider/currentRpc']
|
||||
|
||||
const code = await web3.eth.getCode(action.expectedAddress)
|
||||
console.log('code', code)
|
||||
|
@ -26,6 +26,11 @@ export default {
|
||||
|
||||
return Object.freeze(new Web3(provider))
|
||||
},
|
||||
currentRpc: (state, getters) => {
|
||||
const network = getters.getNetwork
|
||||
const rpcUrl = network.rpcUrls.Infura.url
|
||||
return Object.freeze(new Web3(rpcUrl))
|
||||
},
|
||||
getBalance: (state) => {
|
||||
return state.balance
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user