From d4095a77dbcd515a77a9951715c1d55e3046d1dd Mon Sep 17 00:00:00 2001 From: silkyjohnson1 <61355155+silkyjohnson1@users.noreply.github.com> Date: Sat, 24 Feb 2024 10:27:18 -0500 Subject: [PATCH 01/16] Update currencies.json --- electrum/currencies.json | 55 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/electrum/currencies.json b/electrum/currencies.json index 91fc5bbb8..02ffb7bea 100644 --- a/electrum/currencies.json +++ b/electrum/currencies.json @@ -56,6 +56,59 @@ "ZAR" ], "MEXC (must select USD)": [ - "USD" + "AED", + "ARS", + "AUD", + "BCH", + "BDT", + "BHD", + "BMD", + "BNB", + "BRL", + "BTC", + "CAD", + "CHF", + "CLP", + "CNY", + "CZK", + "DKK", + "EOS", + "ETH", + "EUR", + "GBP", + "HKD", + "HUF", + "IDR", + "ILS", + "INR", + "JPY", + "KRW", + "KWD", + "LKR", + "LTC", + "MMK", + "MXN", + "MYR", + "NOK", + "NZD", + "PHP", + "PKR", + "PLN", + "RUB", + "SAR", + "SEK", + "SGD", + "THB", + "TRY", + "TWD", + "USD", + "VEF", + "VND", + "XAG", + "XAU", + "XDR", + "XLM", + "XRP", + "ZAR" ] } From 3891e198428f6c10ea5ce40145e58b71ded61f26 Mon Sep 17 00:00:00 2001 From: silkyjohnson1 <61355155+silkyjohnson1@users.noreply.github.com> Date: Sat, 24 Feb 2024 10:31:02 -0500 Subject: [PATCH 02/16] Update currencies.json --- electrum/currencies.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electrum/currencies.json b/electrum/currencies.json index 02ffb7bea..9c3685ce2 100644 --- a/electrum/currencies.json +++ b/electrum/currencies.json @@ -55,7 +55,7 @@ "XRP", "ZAR" ], - "MEXC (must select USD)": [ + "MEXC": [ "AED", "ARS", "AUD", From 350febb1faab18f569cccb153b81b92b4b8096f4 Mon Sep 17 00:00:00 2001 From: silkyjohnson1 <61355155+silkyjohnson1@users.noreply.github.com> Date: Sat, 24 Feb 2024 10:33:03 -0500 Subject: [PATCH 03/16] Update exchange_rate.py --- electrum/exchange_rate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electrum/exchange_rate.py b/electrum/exchange_rate.py index 8e5b9e71a..2ac9308c1 100644 --- a/electrum/exchange_rate.py +++ b/electrum/exchange_rate.py @@ -185,7 +185,7 @@ class MEXC(ExchangeBase): async def get_rates(self, ccy): json = await self.get_json('api.mexc.com', '/api/v3/ticker/price?symbol=FACTUSDT') - return {'USD': to_decimal(json['price'])} + return {'USDT': to_decimal(json['price'])} class CoinGecko(ExchangeBase): From d36c70cf2699b25d87a6ec46528a170bba11cbb2 Mon Sep 17 00:00:00 2001 From: silkyjohnson1 <61355155+silkyjohnson1@users.noreply.github.com> Date: Sat, 24 Feb 2024 10:33:28 -0500 Subject: [PATCH 04/16] Update currencies.json --- electrum/currencies.json | 55 +--------------------------------------- 1 file changed, 1 insertion(+), 54 deletions(-) diff --git a/electrum/currencies.json b/electrum/currencies.json index 9c3685ce2..5ada30dc1 100644 --- a/electrum/currencies.json +++ b/electrum/currencies.json @@ -56,59 +56,6 @@ "ZAR" ], "MEXC": [ - "AED", - "ARS", - "AUD", - "BCH", - "BDT", - "BHD", - "BMD", - "BNB", - "BRL", - "BTC", - "CAD", - "CHF", - "CLP", - "CNY", - "CZK", - "DKK", - "EOS", - "ETH", - "EUR", - "GBP", - "HKD", - "HUF", - "IDR", - "ILS", - "INR", - "JPY", - "KRW", - "KWD", - "LKR", - "LTC", - "MMK", - "MXN", - "MYR", - "NOK", - "NZD", - "PHP", - "PKR", - "PLN", - "RUB", - "SAR", - "SEK", - "SGD", - "THB", - "TRY", - "TWD", - "USD", - "VEF", - "VND", - "XAG", - "XAU", - "XDR", - "XLM", - "XRP", - "ZAR" + "USDT" ] } From 05a7747ff3206da644d1b1f0f5de43f881378c44 Mon Sep 17 00:00:00 2001 From: silkyjohnson1 <61355155+silkyjohnson1@users.noreply.github.com> Date: Sat, 24 Feb 2024 10:35:50 -0500 Subject: [PATCH 05/16] Update Preferences.qml --- electrum/gui/qml/components/Preferences.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electrum/gui/qml/components/Preferences.qml b/electrum/gui/qml/components/Preferences.qml index 47a175ec9..fbdd13f2b 100644 --- a/electrum/gui/qml/components/Preferences.qml +++ b/electrum/gui/qml/components/Preferences.qml @@ -105,7 +105,7 @@ Pane { } Label { Layout.fillWidth: true - text: qsTr('Fiat Currency') + text: qsTr('Base Currency') wrapMode: Text.Wrap } } From a30918f0903952ab7167b5629c4f259288f0f059 Mon Sep 17 00:00:00 2001 From: silkyjohnson1 <61355155+silkyjohnson1@users.noreply.github.com> Date: Sat, 24 Feb 2024 10:36:32 -0500 Subject: [PATCH 06/16] Update currencies.json --- electrum/currencies.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electrum/currencies.json b/electrum/currencies.json index 5ada30dc1..d7bce64e4 100644 --- a/electrum/currencies.json +++ b/electrum/currencies.json @@ -56,6 +56,6 @@ "ZAR" ], "MEXC": [ - "USDT" + "USDT (MEXC only)" ] } From f8784ec46bb560b6184e73416816268f451d1f24 Mon Sep 17 00:00:00 2001 From: silkyjohnson1 <61355155+silkyjohnson1@users.noreply.github.com> Date: Sat, 24 Feb 2024 10:38:23 -0500 Subject: [PATCH 07/16] Update settings_dialog.py --- electrum/gui/qt/settings_dialog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electrum/gui/qt/settings_dialog.py b/electrum/gui/qt/settings_dialog.py index eeb7d732a..23fd382ea 100644 --- a/electrum/gui/qt/settings_dialog.py +++ b/electrum/gui/qt/settings_dialog.py @@ -300,7 +300,7 @@ def on_history_rates(checked): units_widgets.append((msat_cb, None)) units_widgets.append((thousandsep_cb, None)) fiat_widgets = [] - fiat_widgets.append((QLabel(_('Fiat currency')), ccy_combo)) + fiat_widgets.append((QLabel(_('Base currency')), ccy_combo)) fiat_widgets.append((QLabel(_('Source')), ex_combo)) fiat_widgets.append((self.history_rates_cb, None)) misc_widgets = [] From 8b71b8d986565f67dcba04751d635392f5fe10e2 Mon Sep 17 00:00:00 2001 From: silkyjohnson1 <61355155+silkyjohnson1@users.noreply.github.com> Date: Sat, 24 Feb 2024 10:39:11 -0500 Subject: [PATCH 08/16] Update currencies.json --- electrum/currencies.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/electrum/currencies.json b/electrum/currencies.json index d7bce64e4..cf222c7d2 100644 --- a/electrum/currencies.json +++ b/electrum/currencies.json @@ -55,7 +55,7 @@ "XRP", "ZAR" ], - "MEXC": [ - "USDT (MEXC only)" + "MEXC (USDT Only)": [ + "USDT" ] } From cd224f0250dd3847cf4fe6ba92ab108c5dd95910 Mon Sep 17 00:00:00 2001 From: silkyjohnson1 <61355155+silkyjohnson1@users.noreply.github.com> Date: Sat, 24 Feb 2024 10:40:07 -0500 Subject: [PATCH 09/16] Update simple_config.py --- electrum/simple_config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/electrum/simple_config.py b/electrum/simple_config.py index e53203a91..f4fba069f 100644 --- a/electrum/simple_config.py +++ b/electrum/simple_config.py @@ -981,10 +981,10 @@ def _default_swapserver_url(self) -> str: FX_USE_EXCHANGE_RATE = ConfigVar('use_exchange_rate', default=False, type_=bool) FX_CURRENCY = ConfigVar('currency', default='EUR', type_=str) - FX_EXCHANGE = ConfigVar('use_exchange', default='CoinGecko', type_=str) # default exchange should ideally provide historical rates + FX_EXCHANGE = ConfigVar('use_exchange', default='MEXC', type_=str) # default exchange should ideally provide historical rates FX_HISTORY_RATES = ConfigVar( 'history_rates', default=False, type_=bool, - short_desc=lambda: _('Download historical rates'), + short_desc=lambda: _('Download historical rates (Coingecko Only)'), ) FX_HISTORY_RATES_CAPITAL_GAINS = ConfigVar( 'history_rates_capital_gains', default=False, type_=bool, From d42d6f5279c5dd707575147466f4ba136563a71c Mon Sep 17 00:00:00 2001 From: silkyjohnson1 <61355155+silkyjohnson1@users.noreply.github.com> Date: Sat, 24 Feb 2024 10:41:13 -0500 Subject: [PATCH 10/16] Update currencies.json --- electrum/currencies.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electrum/currencies.json b/electrum/currencies.json index cf222c7d2..5ada30dc1 100644 --- a/electrum/currencies.json +++ b/electrum/currencies.json @@ -55,7 +55,7 @@ "XRP", "ZAR" ], - "MEXC (USDT Only)": [ + "MEXC": [ "USDT" ] } From 2a74bb75385433e93f7e7aecd49adad821b4287c Mon Sep 17 00:00:00 2001 From: silkyjohnson1 <61355155+silkyjohnson1@users.noreply.github.com> Date: Sat, 24 Feb 2024 10:43:10 -0500 Subject: [PATCH 11/16] Update exchange_rate.py --- electrum/exchange_rate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/electrum/exchange_rate.py b/electrum/exchange_rate.py index 2ac9308c1..a70753053 100644 --- a/electrum/exchange_rate.py +++ b/electrum/exchange_rate.py @@ -32,7 +32,7 @@ 'RWF': 0, 'TND': 3, 'UGX': 0, 'UYI': 0, 'VND': 0, 'VUV': 0, 'XAF': 0, 'XAU': 4, 'XOF': 0, 'XPF': 0, # Cryptocurrencies - 'BTC': 8, 'LTC': 8, 'XRP': 6, 'ETH': 18, 'FACT': 8, 'FACT0RN': 8 + 'BTC': 8, 'LTC': 8, 'XRP': 6, 'ETH': 18, 'USDT': 18 } SPOT_RATE_REFRESH_TARGET = 150 # approx. every 2.5 minutes, try to refresh spot price @@ -185,7 +185,7 @@ class MEXC(ExchangeBase): async def get_rates(self, ccy): json = await self.get_json('api.mexc.com', '/api/v3/ticker/price?symbol=FACTUSDT') - return {'USDT': to_decimal(json['price'])} + return {'USD': to_decimal(json['price'])} class CoinGecko(ExchangeBase): From 20c6e7ed1c26b559560f907e649ad3c92a706522 Mon Sep 17 00:00:00 2001 From: silkyjohnson1 <61355155+silkyjohnson1@users.noreply.github.com> Date: Sat, 24 Feb 2024 10:44:41 -0500 Subject: [PATCH 12/16] Update exchange_rate.py --- electrum/exchange_rate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electrum/exchange_rate.py b/electrum/exchange_rate.py index a70753053..2fcfbdf4a 100644 --- a/electrum/exchange_rate.py +++ b/electrum/exchange_rate.py @@ -185,7 +185,7 @@ class MEXC(ExchangeBase): async def get_rates(self, ccy): json = await self.get_json('api.mexc.com', '/api/v3/ticker/price?symbol=FACTUSDT') - return {'USD': to_decimal(json['price'])} + return {'USDT': to_decimal(json['price'])} class CoinGecko(ExchangeBase): From 6975af05c51a0d3bf7affc2db2a7d3ccc6ca29ef Mon Sep 17 00:00:00 2001 From: silkyjohnson1 <61355155+silkyjohnson1@users.noreply.github.com> Date: Sat, 24 Feb 2024 10:46:35 -0500 Subject: [PATCH 13/16] Update simple_config.py --- electrum/simple_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electrum/simple_config.py b/electrum/simple_config.py index f4fba069f..c9ee75db2 100644 --- a/electrum/simple_config.py +++ b/electrum/simple_config.py @@ -980,7 +980,7 @@ def _default_swapserver_url(self) -> str: ) FX_USE_EXCHANGE_RATE = ConfigVar('use_exchange_rate', default=False, type_=bool) - FX_CURRENCY = ConfigVar('currency', default='EUR', type_=str) + FX_CURRENCY = ConfigVar('currency', default='USDT', type_=str) FX_EXCHANGE = ConfigVar('use_exchange', default='MEXC', type_=str) # default exchange should ideally provide historical rates FX_HISTORY_RATES = ConfigVar( 'history_rates', default=False, type_=bool, From d9dcad41a97e15600d8282afcba9336bba2e3aa2 Mon Sep 17 00:00:00 2001 From: silkyjohnson1 <61355155+silkyjohnson1@users.noreply.github.com> Date: Sat, 24 Feb 2024 10:48:10 -0500 Subject: [PATCH 14/16] Update exchange_rate.py --- electrum/exchange_rate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electrum/exchange_rate.py b/electrum/exchange_rate.py index 2fcfbdf4a..a70753053 100644 --- a/electrum/exchange_rate.py +++ b/electrum/exchange_rate.py @@ -185,7 +185,7 @@ class MEXC(ExchangeBase): async def get_rates(self, ccy): json = await self.get_json('api.mexc.com', '/api/v3/ticker/price?symbol=FACTUSDT') - return {'USDT': to_decimal(json['price'])} + return {'USD': to_decimal(json['price'])} class CoinGecko(ExchangeBase): From 824c40f4898087d32be8812508913aee49d320bc Mon Sep 17 00:00:00 2001 From: silkyjohnson1 <61355155+silkyjohnson1@users.noreply.github.com> Date: Sat, 24 Feb 2024 10:55:59 -0500 Subject: [PATCH 15/16] Update exchange_rate.py --- electrum/exchange_rate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electrum/exchange_rate.py b/electrum/exchange_rate.py index a70753053..107cb791b 100644 --- a/electrum/exchange_rate.py +++ b/electrum/exchange_rate.py @@ -32,7 +32,7 @@ 'RWF': 0, 'TND': 3, 'UGX': 0, 'UYI': 0, 'VND': 0, 'VUV': 0, 'XAF': 0, 'XAU': 4, 'XOF': 0, 'XPF': 0, # Cryptocurrencies - 'BTC': 8, 'LTC': 8, 'XRP': 6, 'ETH': 18, 'USDT': 18 + 'BTC': 8, 'LTC': 8, 'XRP': 6, 'ETH': 18, 'USDT': 0, } SPOT_RATE_REFRESH_TARGET = 150 # approx. every 2.5 minutes, try to refresh spot price From 52258bf733c12713c1b3d02f71f0b8a117d7212f Mon Sep 17 00:00:00 2001 From: silkyjohnson1 <61355155+silkyjohnson1@users.noreply.github.com> Date: Sat, 24 Feb 2024 10:56:59 -0500 Subject: [PATCH 16/16] Update exchange_rate.py --- electrum/exchange_rate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electrum/exchange_rate.py b/electrum/exchange_rate.py index 107cb791b..80af1f402 100644 --- a/electrum/exchange_rate.py +++ b/electrum/exchange_rate.py @@ -185,7 +185,7 @@ class MEXC(ExchangeBase): async def get_rates(self, ccy): json = await self.get_json('api.mexc.com', '/api/v3/ticker/price?symbol=FACTUSDT') - return {'USD': to_decimal(json['price'])} + return {'USDT': to_decimal(json['price'])} class CoinGecko(ExchangeBase):