From 31211a33fde625f401d19bfe20fd8564cf62feb1 Mon Sep 17 00:00:00 2001 From: Verbalinsurection Date: Tue, 25 Jan 2022 11:20:49 +0100 Subject: [PATCH 1/3] Fix ETH duplicate in CoinGecko --- freqtrade/rpc/fiat_convert.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/freqtrade/rpc/fiat_convert.py b/freqtrade/rpc/fiat_convert.py index ef9689d0a..f65fd2d54 100644 --- a/freqtrade/rpc/fiat_convert.py +++ b/freqtrade/rpc/fiat_convert.py @@ -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'] From 660f474ab899b1bc2ff23957b37884a6cf6dcd82 Mon Sep 17 00:00:00 2001 From: Verbalinsurection Date: Tue, 25 Jan 2022 11:20:49 +0100 Subject: [PATCH 2/3] Fix ETH duplicate in CoinGecko --- freqtrade/rpc/fiat_convert.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/freqtrade/rpc/fiat_convert.py b/freqtrade/rpc/fiat_convert.py index ef9689d0a..f65fd2d54 100644 --- a/freqtrade/rpc/fiat_convert.py +++ b/freqtrade/rpc/fiat_convert.py @@ -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'] From 2ba2144df18084cad294997f5ad793a5de4fb9f6 Mon Sep 17 00:00:00 2001 From: Verbalinsurection Date: Fri, 28 Jan 2022 11:17:16 +0100 Subject: [PATCH 3/3] Add tests for ETH fiat_convert --- tests/rpc/test_fiat_convert.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/rpc/test_fiat_convert.py b/tests/rpc/test_fiat_convert.py index 2fe5d4a56..c87cea259 100644 --- a/tests/rpc/test_fiat_convert.py +++ b/tests/rpc/test_fiat_convert.py @@ -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)