|
|
@ -448,12 +448,8 @@ class ElectrumWindow(App): |
|
|
|
self.load_wallet_by_name(self.electrum_config.get_wallet_path()) |
|
|
|
# init plugins |
|
|
|
run_hook('init_kivy', self) |
|
|
|
|
|
|
|
# fiat currency |
|
|
|
self.fiat_unit = self.fx.ccy if self.fx.is_enabled() else '' |
|
|
|
self.network.register_callback(self.on_quotes, ['on_quotes']) |
|
|
|
self.network.register_callback(self.on_history, ['on_history']) |
|
|
|
|
|
|
|
# default tab |
|
|
|
self.switch_to('history') |
|
|
|
# bind intent for bitcoin: URI scheme |
|
|
@ -464,12 +460,18 @@ class ElectrumWindow(App): |
|
|
|
mactivity = PythonActivity.mActivity |
|
|
|
self.on_new_intent(mactivity.getIntent()) |
|
|
|
activity.bind(on_new_intent=self.on_new_intent) |
|
|
|
|
|
|
|
# connect callbacks |
|
|
|
if self.network: |
|
|
|
interests = ['updated', 'status', 'new_transaction', 'verified', 'interfaces'] |
|
|
|
self.network.register_callback(self.on_network_event, interests) |
|
|
|
self.network.register_callback(self.on_quotes, ['on_quotes']) |
|
|
|
self.network.register_callback(self.on_history, ['on_history']) |
|
|
|
# URI passed in config |
|
|
|
uri = self.electrum_config.get('url') |
|
|
|
if uri: |
|
|
|
self.set_URI(uri) |
|
|
|
|
|
|
|
|
|
|
|
def get_wallet_path(self): |
|
|
|
if self.wallet: |
|
|
|
return self.wallet.storage.path |
|
|
@ -585,13 +587,7 @@ class ElectrumWindow(App): |
|
|
|
self.invoices_screen = None |
|
|
|
self.receive_screen = None |
|
|
|
self.requests_screen = None |
|
|
|
|
|
|
|
self.icon = "icons/electrum.png" |
|
|
|
|
|
|
|
# connect callbacks |
|
|
|
if self.network: |
|
|
|
interests = ['updated', 'status', 'new_transaction', 'verified', 'interfaces'] |
|
|
|
self.network.register_callback(self.on_network_event, interests) |
|
|
|
self.tabs = self.root.ids['tabs'] |
|
|
|
|
|
|
|
def update_interfaces(self, dt): |
|
|
|