From d22bb59de5d3b2773e16d200e6c5860616e0ea22 Mon Sep 17 00:00:00 2001 From: Danil Kovtonyuk Date: Tue, 30 Mar 2021 17:41:46 +1000 Subject: [PATCH] fix: proxy contract --- src/worker.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/worker.js b/src/worker.js index 9b8e28c..22c3ece 100644 --- a/src/worker.js +++ b/src/worker.js @@ -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) @@ -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 }) {