Skip to content

Commit

Permalink
fix: proxy contract
Browse files Browse the repository at this point in the history
  • Loading branch information
dan1kov authored and pertsev committed Mar 30, 2021
1 parent 5d4ae59 commit d22bb59
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,12 @@ async function checkMiningFee({ args }) {
}

async function getProxyContract() {
let proxyAddress = await resolver.resolve(torn.tornadoProxy.address)
let proxyAddress

if (netId === 5) {
proxyAddress = tornadoGoerliProxy
} else {
proxyAddress = await resolver.resolve(torn.tornadoProxy.address)
}

const contract = new web3.eth.Contract(tornadoProxyABI, proxyAddress)
Expand All @@ -191,7 +193,7 @@ async function getProxyContract() {

function checkOldProxy(address) {
const OLD_PROXY = '0x905b63Fff465B9fFBF41DeA908CEb12478ec7601'
return toChecksumAddress(address) === OLD_PROXY
return toChecksumAddress(address) === toChecksumAddress(OLD_PROXY)
}

async function getTxObject({ data }) {
Expand Down

0 comments on commit d22bb59

Please sign in to comment.