electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit d2a80f15a189f0de605814a5a39f6cec7ef62681
parent fd58a0cb20881250510f4be68fbbd6274e8417e9
Author: SomberNight <somber.night@protonmail.com>
Date:   Mon, 13 May 2019 20:05:01 +0200

kivy fx dialog: fix #5329

Diffstat:
Melectrum/gui/kivy/uix/dialogs/fx_dialog.py | 11++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/electrum/gui/kivy/uix/dialogs/fx_dialog.py b/electrum/gui/kivy/uix/dialogs/fx_dialog.py @@ -95,15 +95,20 @@ class FxDialog(Factory.Popup): self.add_currencies() def add_exchanges(self): + ex = self.ids.exchanges if self.fx.is_enabled(): exchanges = sorted(self.fx.get_exchanges_by_ccy(self.fx.get_currency(), self.has_history_rates)) mx = self.fx.exchange.name() + if mx in exchanges: + ex.text = mx + elif exchanges: + ex.text = exchanges[0] + else: + ex.text = '' else: exchanges = [] - mx = '' - ex = self.ids.exchanges + ex.text = '' ex.values = exchanges - ex.text = (mx if mx in exchanges else exchanges[0]) if self.fx.is_enabled() else '' def on_exchange(self, text): if not text: