Skip to content

Commit

Permalink
fixed bancor adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
yudilevi committed Nov 4, 2020
1 parent 84afb02 commit 14b54ba
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions projects/bancor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 14b54ba

Please sign in to comment.