Commit Graph

218 Commits

Author SHA1 Message Date
SomberNight
612a8e6424 qt: fix: bip70 pay reqs need x509 verification
regression from https://github.com/spesmilo/electrum/pull/8462

- pr.verify() was called in qml, but not in qt gui
- we now call pr.verify() in get_payment_request(), to make the API less error-prone
- it is now ok to call pr.verify() multiple times, the result is cached
2023-07-10 17:50:53 +00:00
Sander van Grieken
f980bd97b5 payment_identifier: factor out bip21 functions to bip21.py to break cyclic dependencies,
parse bolt11 only once, store invoice internally instead of bolt11 string
add is_onchain method to indicate if payment identifier can be paid onchain
2023-07-08 12:18:37 +02:00
ThomasV
15eb765eac payment_identifiers:
- this separates GUI from core handling
 - the PaymentIdentifier class handles network requests
 - the GUI is agnostic about the type of PI
2023-06-28 16:49:28 +02:00
SomberNight
24980feab7 config: introduce ConfigVars
A new config API is introduced, and ~all of the codebase is adapted to it.
The old API is kept but mainly only for dynamic usage where its extra flexibility is needed.

Using examples, the old config API looked this:
```
>>> config.get("request_expiry", 86400)
604800
>>> config.set_key("request_expiry", 86400)
>>>
```

The new config API instead:
```
>>> config.WALLET_PAYREQ_EXPIRY_SECONDS
604800
>>> config.WALLET_PAYREQ_EXPIRY_SECONDS = 86400
>>>
```

The old API operated on arbitrary string keys, the new one uses
a static ~enum-like list of variables.

With the new API:
- there is a single centralised list of config variables, as opposed to
  these being scattered all over
- no more duplication of default values (in the getters)
- there is now some (minimal for now) type-validation/conversion for
  the config values

closes https://github.com/spesmilo/electrum/pull/5640
closes https://github.com/spesmilo/electrum/pull/5649

Note: there is yet a third API added here, for certain niche/abstract use-cases,
where we need a reference to the config variable itself.
It should only be used when needed:
```
>>> var = config.cv.WALLET_PAYREQ_EXPIRY_SECONDS
>>> var
<ConfigVarWithConfig key='request_expiry'>
>>> var.get()
604800
>>> var.set(3600)
>>> var.get_default_value()
86400
>>> var.is_set()
True
>>> var.is_modifiable()
True
```
2023-05-25 17:39:48 +00:00
SomberNight
03ab33f4b2 SimpleConfig: change API of set_key(): "save" is now kwarg-only 2023-05-25 17:37:16 +00:00
SomberNight
55140a9e27 gui/messages.py: allow localization of these strings 2023-04-25 17:54:07 +00:00
SomberNight
8266ebcc46 fix flake8-bugbear B008
B008 Do not perform function calls in argument defaults.  The call is performed only once at function definition time. All calls to your function will reuse the result of that definition-time function call.  If this is intended, assign the function call to a module-level variable and use that variable as a default value.
2023-04-24 12:58:23 +00:00
SomberNight
312f2641e7 don't use bare except
use "except Exception", or if really needed explicitly "except BaseException"
2023-04-24 12:58:01 +00:00
ThomasV
e8ac09721c kivy: remove user_rbf boolean property (unused) 2022-12-07 15:59:11 +01:00
accumulator
6e536d2d91 add invoice status to invoice_status callback (#8020)
* add invoice status to invoice_status callback

* debug statement fails tests

* removed commented lines, added progress/attempt counter comment in lnworker.pay_to_node,
and update the invoice_status event handler in qeinvoicelistmodel.py
2022-10-21 16:45:12 +00:00
ghost43
b619e2b3af Merge pull request #8003 from SomberNight/202210_android_debug_logs
android: add setting to enable debug logs
2022-10-10 19:03:52 +00:00
SomberNight
174cbde762 kivy: window.request_focus_for_main_view: fix compat with newer pyjnius
```
Traceback (most recent call last):
  File "kivy/_clock.pyx", line 645, in kivy._clock.CyClockBase._process_events
  File "kivy/_clock.pyx", line 218, in kivy._clock.ClockEvent.tick
  File "/home/user/wspace/electrum/.buildozer_kivy/android/app/electrum/gui/kivy/uix/dialogs/password_dialog.py", line 227, in <lambda>
  File "/home/user/wspace/electrum/.buildozer_kivy/android/app/electrum/gui/kivy/uix/dialogs/password_dialog.py", line 333, in <lambda>
  File "/home/user/wspace/electrum/.buildozer_kivy/android/app/electrum/gui/kivy/main_window.py", line 721, in on_open_wallet
  File "/home/user/wspace/electrum/.buildozer_kivy/android/app/electrum/gui/kivy/main_window.py", line 687, in on_wizard_success
  File "/home/user/wspace/electrum/.buildozer_kivy/android/app/electrum/util.py", line 445, in <lambda>
  File "/home/user/wspace/electrum/.buildozer_kivy/android/app/electrum/util.py", line 441, in do_profile
  File "/home/user/wspace/electrum/.buildozer_kivy/android/app/electrum/gui/kivy/main_window.py", line 940, in load_wallet
  File "/home/user/wspace/electrum/.buildozer_kivy/android/app/electrum/gui/kivy/main_window.py", line 950, in request_focus_for_main_view
  File "jnius/jnius_export_class.pxi", line 844, in jnius.jnius.JavaMethod.__call__
jnius.jnius.JavaException: Cannot call instance method b'requestFocusForMainView' on class b'org/kivy/android/PythonActivity'
```
2022-10-10 14:43:43 +00:00
SomberNight
34b594ea40 android: add setting to enable debug logs
If enabled, we log to stderr, which can get inspected via logcat.
Not user-friendly at all - but previously there was no way to get logs from a release build.

closes https://github.com/spesmilo/electrum/issues/7409
2022-10-07 20:28:52 +00:00
SomberNight
7b095158bf wallet: add get_label_for_address, and make get_label private
fixes https://github.com/spesmilo/electrum/issues/7919

In the past, when creating payment requests, we keyed them by on-chain address,
and set/saved the msg of the request as label for the address.
Many places in the code were calling wallet.get_label(addr) with the expectation that
relevant payment requests are found and their message/description (if any) is considered.

wallet.get_label(key) is now made private, and instead the explicit non-polymorphic
wallet.get_label_for_{address,rhash,txid} alternatives should be used.
2022-08-09 17:21:14 +02:00
ThomasV
3afee67ea3 kivy GUI: show better error message if we cannot channel backup import because lightning is disabled or unavailable. fixes #7899 2022-07-21 09:11:55 +02:00
SomberNight
056de017f0 wallet: use get_request(addr) instead of receive_requests[addr]
since "invoice unification", requests are often keyed by rhash
2022-07-12 15:38:54 +02:00
SomberNight
c463f5e23d password unification refactor: move methods from wallet to daemon
Note in particular that check_password_for_directory was not safe to use while the daemon had wallets loaded,
as the same file would have two corresponding Wallet() instances in memory. This was specifically handled in
the kivy GUI, on the caller side, by stopping-before and reloading-after the wallets; but it was dirty to
have the caller handle this.
2022-07-06 19:57:27 +02:00
ghost43
05226437bf Merge pull request #7839 from SomberNight/202202_lnurl_2
add lnurl-pay (`LUD-06`) support
2022-06-30 16:30:21 +00:00
SomberNight
1f6bd9a694 kivy: fix threading issue for window.show_error
related: 5e0df77df6

kivy 2.1 seemingly became more sensitive to threading issues.
This used to work on kivy 2.0 and older, but 2.1 is complaining.

```
E | lnworker.LNWallet.[default_wallet] | Exception in pay_invoice: TypeError('Cannot create graphics instruction outside the main Kivy thread')
Traceback (most recent call last):
  File "...\electrum\util.py", line 1184, in wrapper
    return await func(*args, **kwargs)
  File "...\electrum\lnworker.py", line 1178, in pay_invoice
    util.trigger_callback('payment_succeeded', self.wallet, key)
  File "...\electrum\util.py", line 1633, in trigger_callback
    callback(*args)
  File "...\electrum\gui\kivy\main_window.py", line 309, in on_event_payment_succeeded
    self.show_info(_('Payment succeeded') + '\n\n' + description)
  File "...\electrum\gui\kivy\main_window.py", line 1105, in show_info
    self.show_error(error, icon=f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/important',
  File "...\electrum\gui\kivy\main_window.py", line 1097, in show_error
    self.show_info_bubble(text=error, icon=icon, width=width,
  File "...\electrum\gui\kivy\main_window.py", line 1123, in show_info_bubble
    info_bubble = self.info_bubble = Factory.InfoBubble()
  File "...\Python310\site-packages\kivy\uix\bubble.py", line 199, in __init__
    self._arrow_layout = BoxLayout()
  File "...\Python310\site-packages\kivy\uix\boxlayout.py", line 145, in __init__
    super(BoxLayout, self).__init__(**kwargs)
  File "...\Python310\site-packages\kivy\uix\layout.py", line 76, in __init__
    super(Layout, self).__init__(**kwargs)
  File "...\Python310\site-packages\kivy\uix\widget.py", line 361, in __init__
    self.canvas = Canvas(opacity=self.opacity)
  File "kivy\graphics\instructions.pyx", line 608, in kivy.graphics.instructions.Canvas.__init__
  File "kivy\graphics\instructions.pyx", line 154, in kivy.graphics.instructions.InstructionGroup.__init__
  File "kivy\graphics\instructions.pyx", line 60, in kivy.graphics.instructions.Instruction.__init__
TypeError: Cannot create graphics instruction outside the main Kivy thread
E | gui.kivy.uix.dialogs.crash_reporter.ExceptionHook | exception caught by crash reporter
Traceback (most recent call last):
  File "...\electrum\gui\kivy\uix\screens.py", line 419, in pay_thread
    fut.result()
  File "...\Python310\lib\concurrent\futures\_base.py", line 446, in result
    return self.__get_result()
  File "...\Python310\lib\concurrent\futures\_base.py", line 391, in __get_result
    raise self._exception
  File "...\electrum\util.py", line 1184, in wrapper
    return await func(*args, **kwargs)
  File "...\electrum\lnworker.py", line 1178, in pay_invoice
    util.trigger_callback('payment_succeeded', self.wallet, key)
  File "...\electrum\util.py", line 1633, in trigger_callback
    callback(*args)
  File "...\electrum\gui\kivy\main_window.py", line 309, in on_event_payment_succeeded
    self.show_info(_('Payment succeeded') + '\n\n' + description)
  File "...\electrum\gui\kivy\main_window.py", line 1105, in show_info
    self.show_error(error, icon=f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/important',
  File "...\electrum\gui\kivy\main_window.py", line 1097, in show_error
    self.show_info_bubble(text=error, icon=icon, width=width,
  File "...\electrum\gui\kivy\main_window.py", line 1123, in show_info_bubble
    info_bubble = self.info_bubble = Factory.InfoBubble()
  File "...\Python310\site-packages\kivy\uix\bubble.py", line 199, in __init__
    self._arrow_layout = BoxLayout()
  File "...\Python310\site-packages\kivy\uix\boxlayout.py", line 145, in __init__
    super(BoxLayout, self).__init__(**kwargs)
  File "...\Python310\site-packages\kivy\uix\layout.py", line 76, in __init__
    super(Layout, self).__init__(**kwargs)
  File "...\Python310\site-packages\kivy\uix\widget.py", line 361, in __init__
    self.canvas = Canvas(opacity=self.opacity)
  File "kivy\graphics\instructions.pyx", line 608, in kivy.graphics.instructions.Canvas.__init__
  File "kivy\graphics\instructions.pyx", line 154, in kivy.graphics.instructions.InstructionGroup.__init__
  File "kivy\graphics\instructions.pyx", line 60, in kivy.graphics.instructions.Instruction.__init__
TypeError: Cannot create graphics instruction outside the main Kivy thread

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "...\electrum\util.py", line 1128, in run_with_except_hook
    run_original(*args2, **kwargs2)
  File "...\Python310\lib\threading.py", line 946, in run
    self._target(*self._args, **self._kwargs)
  File "...\electrum\gui\kivy\uix\screens.py", line 421, in pay_thread
    self.app.show_error(repr(e))
  File "...\electrum\gui\kivy\main_window.py", line 1097, in show_error
    self.show_info_bubble(text=error, icon=icon, width=width,
  File "...\electrum\gui\kivy\main_window.py", line 1123, in show_info_bubble
    info_bubble = self.info_bubble = Factory.InfoBubble()
  File "...\Python310\site-packages\kivy\uix\bubble.py", line 199, in __init__
    self._arrow_layout = BoxLayout()
  File "...\Python310\site-packages\kivy\uix\boxlayout.py", line 145, in __init__
    super(BoxLayout, self).__init__(**kwargs)
  File "...\Python310\site-packages\kivy\uix\layout.py", line 76, in __init__
    super(Layout, self).__init__(**kwargs)
  File "...\Python310\site-packages\kivy\uix\widget.py", line 361, in __init__
    self.canvas = Canvas(opacity=self.opacity)
  File "kivy\graphics\instructions.pyx", line 608, in kivy.graphics.instructions.Canvas.__init__
  File "kivy\graphics\instructions.pyx", line 154, in kivy.graphics.instructions.InstructionGroup.__init__
  File "kivy\graphics\instructions.pyx", line 60, in kivy.graphics.instructions.Instruction.__init__
TypeError: Cannot create graphics instruction outside the main Kivy thread
 Exception in thread Thread-2 (pay_thread):
 Traceback (most recent call last):
   File "...\electrum\gui\kivy\uix\screens.py", line 419, in pay_thread
     fut.result()
   File "...\Python310\lib\concurrent\futures\_base.py", line 446, in result
     return self.__get_result()
   File "...\Python310\lib\concurrent\futures\_base.py", line 391, in __get_result
     raise self._exception
   File "...\electrum\util.py", line 1184, in wrapper
     return await func(*args, **kwargs)
   File "...\electrum\lnworker.py", line 1178, in pay_invoice
     util.trigger_callback('payment_succeeded', self.wallet, key)
   File "...\electrum\util.py", line 1633, in trigger_callback
     callback(*args)
   File "...\electrum\gui\kivy\main_window.py", line 309, in on_event_payment_succeeded
     self.show_info(_('Payment succeeded') + '\n\n' + description)
   File "...\electrum\gui\kivy\main_window.py", line 1105, in show_info
     self.show_error(error, icon=f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/important',
   File "...\electrum\gui\kivy\main_window.py", line 1097, in show_error
     self.show_info_bubble(text=error, icon=icon, width=width,
   File "...\electrum\gui\kivy\main_window.py", line 1123, in show_info_bubble
     info_bubble = self.info_bubble = Factory.InfoBubble()
   File "...\Python310\site-packages\kivy\uix\bubble.py", line 199, in __init__
     self._arrow_layout = BoxLayout()
   File "...\Python310\site-packages\kivy\uix\boxlayout.py", line 145, in __init__
     super(BoxLayout, self).__init__(**kwargs)
   File "...\Python310\site-packages\kivy\uix\layout.py", line 76, in __init__
     super(Layout, self).__init__(**kwargs)
   File "...\Python310\site-packages\kivy\uix\widget.py", line 361, in __init__
     self.canvas = Canvas(opacity=self.opacity)
   File "kivy\graphics\instructions.pyx", line 608, in kivy.graphics.instructions.Canvas.__init__
   File "kivy\graphics\instructions.pyx", line 154, in kivy.graphics.instructions.InstructionGroup.__init__
   File "kivy\graphics\instructions.pyx", line 60, in kivy.graphics.instructions.Instruction.__init__
 TypeError: Cannot create graphics instruction outside the main Kivy thread

 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "...\electrum\util.py", line 1128, in run_with_except_hook
     run_original(*args2, **kwargs2)
   File "...\Python310\lib\threading.py", line 946, in run
     self._target(*self._args, **self._kwargs)
   File "...\electrum\gui\kivy\uix\screens.py", line 421, in pay_thread
     self.app.show_error(repr(e))
   File "...\electrum\gui\kivy\main_window.py", line 1097, in show_error
     self.show_info_bubble(text=error, icon=icon, width=width,
   File "...\electrum\gui\kivy\main_window.py", line 1123, in show_info_bubble
     info_bubble = self.info_bubble = Factory.InfoBubble()
   File "...\Python310\site-packages\kivy\uix\bubble.py", line 199, in __init__
     self._arrow_layout = BoxLayout()
   File "...\Python310\site-packages\kivy\uix\boxlayout.py", line 145, in __init__
     super(BoxLayout, self).__init__(**kwargs)
   File "...\Python310\site-packages\kivy\uix\layout.py", line 76, in __init__
     super(Layout, self).__init__(**kwargs)
   File "...\Python310\site-packages\kivy\uix\widget.py", line 361, in __init__
     self.canvas = Canvas(opacity=self.opacity)
   File "kivy\graphics\instructions.pyx", line 608, in kivy.graphics.instructions.Canvas.__init__
   File "kivy\graphics\instructions.pyx", line 154, in kivy.graphics.instructions.InstructionGroup.__init__
   File "kivy\graphics\instructions.pyx", line 60, in kivy.graphics.instructions.Instruction.__init__
 TypeError: Cannot create graphics instruction outside the main Kivy thread

 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "...\Python310\lib\threading.py", line 1009, in _bootstrap_inner
     self.run()
   File "...\electrum\util.py", line 1130, in run_with_except_hook
     sys.excepthook(*sys.exc_info())
   File "...\electrum\gui\kivy\uix\dialogs\crash_reporter.py", line 188, in <lambda>
     sys.excepthook = lambda exctype, value, tb: self.handle_exception(value)
   File "...\electrum\gui\kivy\uix\dialogs\crash_reporter.py", line 199, in handle_exception
     e = CrashReporter(self.main_window, *exc_info)
   File "...\electrum\gui\kivy\uix\dialogs\crash_reporter.py", line 100, in __init__
     Factory.Popup.__init__(self)
   File "...\Python310\site-packages\kivy\uix\modalview.py", line 195, in __init__
     super(ModalView, self).__init__(**kwargs)
   File "...\Python310\site-packages\kivy\uix\anchorlayout.py", line 68, in __init__
     super(AnchorLayout, self).__init__(**kwargs)
   File "...\Python310\site-packages\kivy\uix\layout.py", line 76, in __init__
     super(Layout, self).__init__(**kwargs)
   File "...\Python310\site-packages\kivy\uix\widget.py", line 361, in __init__
     self.canvas = Canvas(opacity=self.opacity)
   File "kivy\graphics\instructions.pyx", line 608, in kivy.graphics.instructions.Canvas.__init__
   File "kivy\graphics\instructions.pyx", line 154, in kivy.graphics.instructions.InstructionGroup.__init__
   File "kivy\graphics\instructions.pyx", line 60, in kivy.graphics.instructions.Instruction.__init__
 TypeError: Cannot create graphics instruction outside the main Kivy thread

```
2022-06-29 17:47:24 +02:00
SomberNight
a2d66ac90c kivy: rm code dupe between app.on_qr and send_screen.do_paste 2022-06-29 16:18:27 +02:00
SomberNight
649cad0122 lnurl: clean-up 2022-06-29 16:18:23 +02:00
SomberNight
82e33984ad lnurl for kivy: I need this to buy beers 2022-06-29 16:18:19 +02:00
bitromortac
fe2fbbd9b1 add lnurl-pay and lightning address support
* bundles all payment identifiers into handle_payment_identifier
* adds lnurl decoding
* adds lightning address decoding
2022-06-29 16:18:15 +02:00
ThomasV
dbf055de9a EventListener class to handle callbacks
and QtEventListener for Qt
2022-06-22 02:07:46 +02:00
ThomasV
79428756b2 kivy: in event handlers, check wallet.
We might receive events before the wallet is loaded.
2022-06-16 16:50:31 +02:00
ThomasV
121d8732f1 Persist LNWatcher transactions in wallet file:
- separate AddressSynchronizer from Wallet and LNWatcher
 - the AddressSynchronizer class is referred to as 'adb' (address database)
 - Use callbacks to replace overloaded methods
2022-06-10 13:07:53 +02:00
SomberNight
a758c99bbe kivy: add "clear all gossip" button in ln gossip dialog
One usecase is perhaps to save space if using trampoline anyway...
more importantly, if using gossip, LNGossip is heavily filtering what messages we request and get,
and e.g. can missing new NodeAnnouncements, etc,
and this is a quick-and-dirty workaround to force a fresh start.
2022-06-02 18:28:21 +02:00
SomberNight
5e0df77df6 kivy: fix threading issue when scanning bip70 qr code on newer kivy
kivy 2.1 seemingly became more sensitive to threading issues.
This used to work on kivy 2.0 and older, but 2.1 is complaining.

```
I | paymentrequest | Error while contacting payment URL: https://bitpay.com/i/... -- error type: <class 'aiohttp.client_exceptions.ClientResponseError'> -- Got HTTP status code 404.
E | util | Exception in get_payment_request: TypeError('Cannot create graphics instruction outside the main Kivy thread')
Traceback (most recent call last):
  File "/home/user/wspace/electrum/electrum/util.py", line 1175, in wrapper
    return await func(*args, **kwargs)
  File "/home/user/wspace/electrum/electrum/util.py", line 1033, in get_payment_request
    on_pr(request)
  File "/home/user/wspace/electrum/electrum/gui/kivy/main_window.py", line 460, in on_pr
    self.show_error("invoice error:" + pr.error)
  File "/home/user/wspace/electrum/electrum/gui/kivy/main_window.py", line 1066, in show_error
    self.show_info_bubble(text=error, icon=icon, width=width,
  File "/home/user/wspace/electrum/electrum/gui/kivy/main_window.py", line 1092, in show_info_bubble
    info_bubble = self.info_bubble = Factory.InfoBubble()
  File "/usr/local/lib/python3.8/dist-packages/kivy/uix/bubble.py", line 199, in __init__
    self._arrow_layout = BoxLayout()
  File "/usr/local/lib/python3.8/dist-packages/kivy/uix/boxlayout.py", line 145, in __init__
    super(BoxLayout, self).__init__(**kwargs)
  File "/usr/local/lib/python3.8/dist-packages/kivy/uix/layout.py", line 76, in __init__
    super(Layout, self).__init__(**kwargs)
  File "/usr/local/lib/python3.8/dist-packages/kivy/uix/widget.py", line 361, in __init__
    self.canvas = Canvas(opacity=self.opacity)
  File "kivy/graphics/instructions.pyx", line 608, in kivy.graphics.instructions.Canvas.__init__
  File "kivy/graphics/instructions.pyx", line 154, in kivy.graphics.instructions.InstructionGroup.__init__
  File "kivy/graphics/instructions.pyx", line 60, in kivy.graphics.instructions.Instruction.__init__
TypeError: Cannot create graphics instruction outside the main Kivy thread
```
2022-05-30 21:19:50 +02:00
SomberNight
2c57c78ebe asyncio: stop using get_event_loop(). introduce ~singleton loop.
asyncio.get_event_loop() became deprecated in python3.10. (see https://github.com/python/cpython/issues/83710)
```
.../electrum/electrum/daemon.py:470: DeprecationWarning: There is no current event loop
  self.asyncio_loop = asyncio.get_event_loop()
.../electrum/electrum/network.py:276: DeprecationWarning: There is no current event loop
  self.asyncio_loop = asyncio.get_event_loop()
```
Also, according to that thread, "set_event_loop() [... is] not deprecated by oversight".
So, we stop using get_event_loop() and set_event_loop() in our own code.
Note that libraries we use (such as the stdlib for python <3.10), might call get_event_loop,
which then relies on us having called set_event_loop e.g. for the GUI thread. To work around
this, a custom event loop policy providing a get_event_loop implementation is used.

Previously, we have been using a single asyncio event loop, created with
util.create_and_start_event_loop, and code in many places got a reference to this loop
using asyncio.get_event_loop().
Now, we still use a single asyncio event loop, but it is now stored as a global in
util._asyncio_event_loop (access with util.get_asyncio_loop()).

I believe these changes also fix https://github.com/spesmilo/electrum/issues/5376
2022-04-29 18:49:07 +02:00
ThomasV
96433ea2b4 Merge pull request #7778 from SomberNight/202204_invoice_recalc_ids
wallet_db upgrade: recalc keys of outgoing on-chain invoices
2022-04-28 15:12:29 +02:00
Rogach
6d049a30f2 fix typo in warning message shown when enabling lightning (#7782) 2022-04-25 21:35:42 +00:00
SomberNight
adfe542fae wallet_db upgrade: recalc keys of outgoing on-chain invoices
closes https://github.com/spesmilo/electrum/issues/7777
2022-04-22 19:53:55 +02:00
ThomasV
cbb51b31d8 kivy updates 2022-04-20 12:48:22 +02:00
SomberNight
837fc1606c address_sync: change up_to_date to be private; no lock needed to read
After some consideration I am fairly certain there is no need to take
wallet.lock in `is_up_to_date()`. Any caller that might want some kind
of guarantees re the value returned by is_up_to_date() would need to
enforce them itself by e.g. taking wallet.lock around its critical code
block. That is, even if is_up_to_date() itself takes the lock, between
the call returning and the caller reading the value there could still
have been a race.
Also, the GUI was directly accessing the field already.
2022-04-08 20:33:13 +02:00
SomberNight
841a701acf kivy: show error when failing to save wallet file backup
related: https://github.com/spesmilo/electrum/issues/6774#issuecomment-856098099
2022-03-14 16:45:07 +01:00
SomberNight
7cb11ceda4 kivy: locale: set default language based to OS lang
On Android, the default language is now set to the language of the OS,
instead of English.

related https://github.com/spesmilo/electrum/issues/4618
related https://github.com/spesmilo/electrum/issues/7494
2021-09-15 19:51:10 +02:00
SomberNight
acbb363240 follow-up prev: some clean-ups
re https://github.com/spesmilo/electrum/pull/7492
2021-09-15 16:41:41 +02:00
SomberNight
bf6400ae30 kivy: fix when running with --offline 2021-09-09 17:40:21 +02:00
SomberNight
67f14cdfa8 follow-up prev: some clean-up and added clarifications
re https://github.com/spesmilo/electrum/pull/7464
2021-09-09 17:22:37 +02:00
Siddhant Chawla
3a583885d9 Add network setup option when Kivy GUI starts for the First time. (#7464)
Offer a first-start network setup screen when using the kivy GUI,
similar to what is already done in Qt.
2021-09-09 15:18:19 +00:00
bitromortac
e9a1bd1f1e kivy: fix on_intent to call set_URI 2021-07-30 09:47:43 +02:00
Siddhant Chawla
a8ecc68833 Added BTC and Fiat amount on the confirmation screen for Lightning Invoice (#7425)
Added BTC and Fiat amount(as enabled by the user) on the confirmation screen for a Lightning Invoice in the Kivy GUI 

closes https://github.com/spesmilo/electrum/issues/7410
2021-07-22 18:23:32 +00:00
SomberNight
18c9a1af10 kivy: format_amount: minor clean-up 2021-07-21 18:35:06 +02:00
SomberNight
bc5ec96387 kivy: scan_qr_non_android: handle user closing window
handle user closing window without scanning a qr code
(i.e. cancelling scan)
2021-06-25 16:44:39 +02:00
SomberNight
325cd950a4 kivy: settings dialog: call update() from __init__
this is a clearer/easier-to-understand API
2021-06-11 14:51:09 +02:00
Thorsten Hempel
fbf76af2c5 Update wallet backup access (#7300) 2021-06-07 16:46:25 +00:00
SomberNight
ef3293ab6a kivy: relocate atlas so it can be made a submodule later 2021-04-30 16:44:32 +02:00
SomberNight
12fac3a167 fix running with --offline 2021-04-13 19:05:07 +02:00
ThomasV
e64aed2aec android backups: fix missing parameter 2021-04-03 14:28:36 +02:00
ThomasV
e13e0b11f1 Do not display the warning about static backups in init_lightning. It is not useful to display the same message twice. 2021-03-31 11:00:55 +02:00