Merge pull request #6310 from Verbalinsurection/perso
Fix ETH duplicate in CoinGecko
This commit is contained in:
commit
571ddceaf6
@ -77,6 +77,9 @@ class CryptoToFiatConverter:
|
||||
else:
|
||||
return None
|
||||
found = [x for x in self._coinlistings if x['symbol'] == crypto_symbol]
|
||||
if crypto_symbol == 'eth':
|
||||
found = [x for x in self._coinlistings if x['id'] == 'ethereum']
|
||||
|
||||
if len(found) == 1:
|
||||
return found[0]['id']
|
||||
|
||||
|
@ -148,10 +148,13 @@ def test_fiat_multiple_coins(mocker, caplog):
|
||||
{'id': 'helium', 'symbol': 'hnt', 'name': 'Helium'},
|
||||
{'id': 'hymnode', 'symbol': 'hnt', 'name': 'Hymnode'},
|
||||
{'id': 'bitcoin', 'symbol': 'btc', 'name': 'Bitcoin'},
|
||||
{'id': 'ethereum', 'symbol': 'eth', 'name': 'Ethereum'},
|
||||
{'id': 'ethereum-wormhole', 'symbol': 'eth', 'name': 'Ethereum Wormhole'},
|
||||
]
|
||||
|
||||
assert fiat_convert._get_gekko_id('btc') == 'bitcoin'
|
||||
assert fiat_convert._get_gekko_id('hnt') is None
|
||||
assert fiat_convert._get_gekko_id('eth') == 'ethereum'
|
||||
|
||||
assert log_has('Found multiple mappings in goingekko for hnt.', caplog)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user