From 14b54bad83d291435f009d09450c6ad1ff8229a1 Mon Sep 17 00:00:00 2001 From: yudilevi Date: Wed, 4 Nov 2020 15:26:29 +0200 Subject: [PATCH] fixed bancor adapter --- projects/bancor/index.js | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/projects/bancor/index.js b/projects/bancor/index.js index 87225fea..4b4564d9 100644 --- a/projects/bancor/index.js +++ b/projects/bancor/index.js @@ -145,16 +145,22 @@ const converterRegistryHex = '0x42616e636f72436f6e7665727465725265676973747279'; let result; + let converterRegistryAddress; - // get converter registry address - result = await sdk.api.abi.call({ - target: registryAddress, - abi: abiContractRegistryAddressOf, - params: [converterRegistryHex], - block - }); - - const converterRegistryAddress = result.output; + if (block < 9195218) { + converterRegistryAddress = '0xf6E2D7F616B67E46D708e4410746E9AAb3a4C518'; + } + else { + // get converter registry address + result = await sdk.api.abi.call({ + target: registryAddress, + abi: abiContractRegistryAddressOf, + params: [converterRegistryHex], + block + }); + + converterRegistryAddress = result.output; + } // get pool anchor addresses result = await sdk.api.abi.call({