|
|
@ -68,7 +68,8 @@ Label.register('Roboto', |
|
|
|
'gui/kivy/data/fonts/Roboto-Bold.ttf') |
|
|
|
|
|
|
|
|
|
|
|
from electrum.util import base_units, NoDynamicFeeEstimates |
|
|
|
from electrum.util import (base_units, NoDynamicFeeEstimates, decimal_point_to_base_unit_name, |
|
|
|
base_unit_name_to_decimal_point) |
|
|
|
|
|
|
|
|
|
|
|
class ElectrumWindow(App): |
|
|
@ -159,11 +160,13 @@ class ElectrumWindow(App): |
|
|
|
self._trigger_update_history() |
|
|
|
|
|
|
|
def _get_bu(self): |
|
|
|
return self.electrum_config.get('base_unit', 'mBTC') |
|
|
|
decimal_point = self.electrum_config.get('decimal_point', 5) |
|
|
|
return decimal_point_to_base_unit_name(decimal_point) |
|
|
|
|
|
|
|
def _set_bu(self, value): |
|
|
|
assert value in base_units.keys() |
|
|
|
self.electrum_config.set_key('base_unit', value, True) |
|
|
|
decimal_point = base_unit_name_to_decimal_point(value) |
|
|
|
self.electrum_config.set_key('decimal_point', decimal_point, True) |
|
|
|
self._trigger_update_status() |
|
|
|
self._trigger_update_history() |
|
|
|
|
|
|
|