pendulum-chain / oracle-pallet

The Unlicense
0 stars 0 forks source link

Fix price for PEN and HDX not queried properly from coingecko #24

Closed ebma closed 4 months ago

ebma commented 4 months ago

The conversion from AssetSpecifier to coingecko ID was not correct for the PEN and HDX prices. I adjusted the test to now test the query for all currently crypto assets.

I wrongly assumed that the coingecko ID is always contained in the URL, so e.g. for Pendulum I assumed that it's 'pendulum' because the price is available at https://www.coingecko.com/en/coins/pendulum. However, it turns out that the ID is actually different ('pendulum-chain') which can be seen by querying the data from the coins list endpoint.

Closes #23.

ebma commented 4 months ago

@pendulum-chain/devs please review.