bancorprotocol / contracts-solidity

Bancor Protocol Contracts
Other
840 stars 391 forks source link

Missing relays in api response #254

Closed bugduino closed 5 years ago

bugduino commented 5 years ago

Hi, I'm doing some api calls for getting all relays via /currencies endpoint, but I found that 3 relays are missing in the response "DGDBNT", "FLIXXBNT" and "DTRCBNT" . All of them are tradable using the Bancor website.

The response for the respective tokens "DGD", "FLIXX" and "DTRC" under the details.changer attribute do not shows any of the changer data besides activatedAt.

yudilevi commented 5 years ago

Hey,

Thanks for pointing that out - it was indeed an issue in our API. It is now fixed and deployed.

Thanks!

bugduino commented 5 years ago

Hi, I just found that the same thing happens for RDNBNT and ANTBNT at the moment

uri-b commented 5 years ago

Hi!

Are you iterating through the API?
or is it a direct request to the specific RDNBNT \ ANTBNT currencies ?

I run a quick script to iterate through all the API pages (incrementing "skip" etc ..) - and once I got to RDNBNT I did get the information.

Do note that our currencies structure has been updated, so now you can expect to find the changer information under the currency's details[i].converter field

Does this help?

bugduino commented 5 years ago

Hi, yes I'm iterating all the pages of the currencies endpoint /currencies?limit=100&skip=${from}.

Currently I'm seeing the info for RDNBNT but under details[0].type the type is set to bancor instead of smart like every other relay (except for MRPHBNT which I think it's another relay with a wrong type).

For the ANTBNT I'm not seeing the relayer info in currencies response and only the 'ANT' currency is displayed but no infos are present besides activatedAt in the converter field screenshot from 2019-02-04 19-17-47

uri-b commented 5 years ago

Nice catch! Thanks for bringing this to our attention (;

Should be fixed now. Could you give it another try?

bugduino commented 5 years ago

Ok now seems better and I can use both the relays, but now ANTBNT is the only one that has the details[0].type equal to 'bancor'. One last thing, for the ANTBNT I'm now seeing the relayer info in currencies response, but the 'ANT' currency is displayed without converter infos embedded in the response (only activatedAt is present like in the screenshot above)

uri-b commented 5 years ago

Thanks - fixed the type for ANTBNT!

Regarding ANT - since this is the ERC20 token, it doesn't have a converter. Instead, under details[0].relayCurrencyId you'll find the _id of the relay token, which is ANTBNT. Because only SmartTokens have converters, the relay token is where you'll find all the info for the converter.

In other words, ANT doesn't have a converter. ANTBNT does.

Sounds ok?

bugduino commented 5 years ago

Yeah thank you!