Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions electrum/currencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"XRP",
"ZAR"
],
"MEXC (must select USD)": [
"USD"
"MEXC": [
"USDT"
]
}
4 changes: 2 additions & 2 deletions electrum/exchange_rate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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': 0,
}

SPOT_RATE_REFRESH_TARGET = 150 # approx. every 2.5 minutes, try to refresh spot price
Expand Down Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion electrum/gui/qml/components/Preferences.qml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Pane {
}
Label {
Layout.fillWidth: true
text: qsTr('Fiat Currency')
text: qsTr('Base Currency')
wrapMode: Text.Wrap
}
}
Expand Down
2 changes: 1 addition & 1 deletion electrum/gui/qt/settings_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down
6 changes: 3 additions & 3 deletions electrum/simple_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -980,11 +980,11 @@ 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_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,
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,
Expand Down