Commit Graph

1198 Commits

Author SHA1 Message Date
ThomasV
0c93394513 rename lnworker._pay to pay_invoice, call it directly from GUIs 2021-02-07 12:09:37 +01:00
ThomasV
c01ca101e0 minor: fix typo 2021-02-05 17:24:15 +01:00
ThomasV
cc69cf3f33 Qt: fix deprecation warning 2021-02-05 16:43:00 +01:00
ThomasV
f28a2aae73 Reorganize code so that we can send Multi Part Payments:
- LNWorker is notified about htlc events and creates payment events.
 - LNWorker._pay is a while loop that calls create_routes_from_invoice.
 - create_route_from_invoices should decide whether to split the payment,
   using graph knowledge and feedback from previous attempts (not in this commit)
 - data structures for payment logs are simplified into a single type, HtlcLog
2021-02-05 14:28:58 +01:00
ThomasV
c0bf9b4509 LNWorker: do not save PR_INFLIGHT status, detect it on startup instead 2021-02-04 16:30:50 +01:00
SomberNight
337d4890a1 lnworker/swaps: add '_sat' suffix to arg names and force kwargs 2021-02-01 22:11:56 +01:00
SomberNight
1d9311aeef qt network dialog: show protocol (if ":t") for servers in NodesList 2021-01-27 20:46:56 +01:00
SomberNight
d13995309a qt main_window: add error handling to show_bitcoin_paper
related: #6970
2021-01-27 20:46:53 +01:00
Jin Eguchi
f548b63563 Fix error of showing bitcoin paper(testnet) 2021-01-27 03:34:19 +09:00
ThomasV
d7515b936e Qt: download and show bitcoin whitepaper. fixes #6970 2021-01-26 16:25:07 +01:00
ThomasV
d6e293052a Qt: set need_update on payment received (minor fix) 2021-01-25 13:34:40 +01:00
ThomasV
8a656d648b kivy: disable gossip button is channel_db is None 2021-01-24 15:45:11 +01:00
ThomasV
986de70529 Qt: fix invoices refresh (follow-up 94708f63e4) 2021-01-24 11:40:02 +01:00
ThomasV
895f9daded add 'view log' action for LN payments in tx history 2021-01-24 11:06:08 +01:00
SomberNight
1abecf25c9 qt block explorer: allow custom URL
The QTextEdit expects values such as (one per line):
```
https://blockstream.info/testnet/
https://192.168.0.38:3021/
("https://blockstream.info/testnet/", {'tx': 'tx/', 'addr': 'address/'})
```

closes #4831
2021-01-24 07:11:11 +01:00
SomberNight
bc6f2926f4 commands: add 'freeze_utxo' cmd; to expose this to CLI/RPC 2021-01-22 21:56:11 +01:00
SomberNight
c4e9afa019 wallet.remove_transaction: also rm dependent/child txs
Main motivation is that I often use wallet.remove_transaction
from the Qt console, and would find this behaviour more intuitive.
Note that previously if one were to call this on a tx with children,
the crash reporter would appear with "wallet.get_history() failed balance sanity-check".

related: https://github.com/spesmilo/electrum/issues/6960#issuecomment-764716533
2021-01-21 18:05:48 +01:00
ThomasV
4f3a28b87e kivy: rename 'Channels' dialog to 'Lightning' 2021-01-21 14:32:48 +01:00
ThomasV
a50af83b84 kivy: simplify swaps dialog 2021-01-21 14:12:19 +01:00
Neil Booth
8b5e312e7e qt: fix handling BIP21 URI from e.g. website on macOS
fixes #6933

based on e2171f702d

Co-authored-by: SomberNight <somber.night@protonmail.com>
2021-01-21 04:41:03 +01:00
SomberNight
e365eb0d85 (trivial) kivy: add missing import
follow-up 90d66953cf
2021-01-20 17:33:15 +01:00
SomberNight
1b3674b318 qt send: handle simultaneous NoDynamicFeeEstimates+NotEnoughFunds
fixes #6424
2021-01-20 16:25:03 +01:00
ThomasV
90d66953cf kivy: add confirm_tx_dialog, similar to qt 2021-01-19 14:15:07 +01:00
zebra-lucky
12c9de6bf9 qt: fix PayToEdit.parse_amount (#6951)
nicer error messages for malformed inputs
2021-01-18 22:07:29 +00:00
ThomasV
35c0565395 formatting (rm blank spaces) 2021-01-18 10:59:30 +01:00
bitromortac
08ec368baf fee-slider: fix dialog crashes for float pos values 2021-01-18 10:38:15 +01:00
bitromortac
fe78ed2a8e swaps: add swaps to android 2021-01-18 10:38:15 +01:00
ThomasV
091d7e104a rbf_dialog: show error in the dialog window 2021-01-17 12:15:54 +01:00
ThomasV
9e94ffd08e factorize code for bumb_fee and dscancel dialogs. Disable ok button if fee_rate is None 2021-01-17 10:29:44 +01:00
ThomasV
7619949b2f fix #6674: raise exceptions if dscancel or cpfp create dust or negative output. 2021-01-14 19:44:15 +01:00
ThomasV
1e4fa83098 Kivy: use the same password for all wallets
When the app is started, the password is checked against all
wallets in the directory.

If the test passes:
 - subsequent wallet creations will use the same password
 - subsequent password updates will be performed on all wallets
 - wallets that are not storage encrypted will encrypted
   on the next password update (even if they are watching-only)

This behaviour is restricted on Android, with a 'single_password' config variable.
Wallet creation without password is disabled if single_password is set
2021-01-13 12:24:19 +01:00
ThomasV
9406541456 kivy wizard: verify seed extension 2021-01-13 11:18:34 +01:00
ThomasV
620a6aaf99 kivy: fix confirm_seed_dialog (broken in 77e0d3745e) 2021-01-13 11:07:48 +01:00
ThomasV
66d31305e4 kivy: minor fix (follow-up 94708f63e4) 2021-01-12 12:23:01 +01:00
ThomasV
94708f63e4 invoices and requests: rm 3 seconds delay 2021-01-12 10:59:41 +01:00
ThomasV
a2122a8c19 auto-remove paid invoices from GUI
- delay 3 seconds in GUI
 - kivy remove 'delete' buttons from send/receive screens
2021-01-12 10:59:41 +01:00
ThomasV
90abfda12b add unconfirmed state for onchain invoices and requests 2021-01-12 10:59:11 +01:00
ThomasV
d50a8d1b84 Qt: rename incoming/outgoing payments to send/receive queue. fixes #6711 2021-01-12 10:56:05 +01:00
ThomasV
de903103da pass daemon to Commands instance in qt console. fixes #6926 2021-01-10 11:43:00 +01:00
SomberNight
13c45bd798 qt send tab: mention frozen balance if "not enough funds" in more cases
fixes #6912
2021-01-06 03:05:13 +01:00
SomberNight
4b5616ff14 qt BlockingWaitingDialog: try harder to get label drawn (refresh bug) 2021-01-06 02:29:59 +01:00
SomberNight
85f76523b6 qt tx dialog: use WaitingDialog for network requests in __init__ 2021-01-06 02:27:17 +01:00
SomberNight
422f7ad110 qt tx dialog: fix visual artifact when opening (widget parenting issue) 2021-01-06 02:24:51 +01:00
ThomasV
07b08738a8 kivy wizard: checkum bip39 seeds, because the virtual keyboard imposes the English wordlist 2021-01-02 16:38:05 +01:00
ThomasV
77e0d3745e fix #4326 2021-01-02 11:48:15 +01:00
ThomasV
7e36770a06 fix #6605 2020-12-31 13:00:24 +01:00
ThomasV
39fc72dad6 add paste button to qt payto_e. fixes #6878 2020-12-27 12:01:43 +01:00
SomberNight
112ad72cee qt: follow-up passing-around-config
follow-up b28b3994c7

E | gui.qt.exception_window.Exception_Hook | exception caught by crash reporter
Traceback (most recent call last):
  File "...\electrum\electrum\gui\qt\main_window.py", line 670, in new_wallet
    self.gui_object.start_new_window(full_path, None)
  File "...\electrum\electrum\gui\qt\__init__.py", line 245, in wrapper
    return func(self, *args, **kwargs)
  File "...\electrum\electrum\gui\qt\__init__.py", line 269, in start_new_window
    wallet = self._start_wizard_to_select_or_create_wallet(path)
  File "...\electrum\electrum\gui\qt\__init__.py", line 311, in _start_wizard_to_select_or_create_wallet
    wizard.run('new')
  File "...\electrum\electrum\base_wizard.py", line 115, in run
    f(*args, **kwargs)
  File "...\electrum\electrum\base_wizard.py", line 153, in new
    self.choice_dialog(title=title, message=message, choices=choices, run_next=self.on_wallet_type)
  File "...\electrum\electrum\gui\qt\installwizard.py", line 120, in func_wrapper
    run_next(*out)
  File "...\electrum\electrum\base_wizard.py", line 193, in on_wallet_type
    self.run(action)
  File "...\electrum\electrum\base_wizard.py", line 115, in run
    f(*args, **kwargs)
  File "...\electrum\electrum\base_wizard.py", line 201, in choose_multisig
    self.multisig_dialog(run_next=on_multisig)
  File "...\electrum\electrum\gui\qt\installwizard.py", line 120, in func_wrapper
    run_next(*out)
  File "...\electrum\electrum\base_wizard.py", line 200, in on_multisig
    self.run('choose_keystore')
  File "...\electrum\electrum\base_wizard.py", line 115, in run
    f(*args, **kwargs)
  File "...\electrum\electrum\base_wizard.py", line 225, in choose_keystore
    self.choice_dialog(title=title, message=message, choices=choices, run_next=self.run)
  File "...\electrum\electrum\gui\qt\installwizard.py", line 120, in func_wrapper
    run_next(*out)
  File "...\electrum\electrum\base_wizard.py", line 115, in run
    f(*args, **kwargs)
  File "...\electrum\electrum\base_wizard.py", line 275, in choose_hw_device
    self._choose_hw_device(purpose=purpose, storage=storage)
  File "...\electrum\electrum\base_wizard.py", line 358, in _choose_hw_device
    self.choice_dialog(title=title, message=msg, choices=choices,
  File "...\electrum\electrum\gui\qt\installwizard.py", line 120, in func_wrapper
    run_next(*out)
  File "...\electrum\electrum\base_wizard.py", line 359, in <lambda>
    run_next=lambda *args: self.on_device(*args, purpose=purpose, storage=storage))
  File "...\electrum\electrum\base_wizard.py", line 394, in on_device
    self.derivation_and_script_type_dialog(f)
  File "...\electrum\electrum\base_wizard.py", line 441, in derivation_and_script_type_dialog
    self.derivation_and_script_type_gui_specific_dialog(
  File "...\electrum\electrum\gui\qt\installwizard.py", line 120, in func_wrapper
    run_next(*out)
  File "...\electrum\electrum\base_wizard.py", line 393, in f
    self.run('on_hw_derivation', name, device_info, derivation, script_type)
  File "...\electrum\electrum\base_wizard.py", line 115, in run
    f(*args, **kwargs)
  File "...\electrum\electrum\base_wizard.py", line 490, in on_hw_derivation
    self.on_keystore(k)
  File "...\electrum\electrum\base_wizard.py", line 592, in on_keystore
    self.run('show_xpub_and_add_cosigners', xpub)
  File "...\electrum\electrum\base_wizard.py", line 115, in run
    f(*args, **kwargs)
  File "...\electrum\electrum\base_wizard.py", line 686, in show_xpub_and_add_cosigners
    self.show_xpub_dialog(xpub=xpub, run_next=lambda x: self.run('choose_keystore'))
  File "...\electrum\electrum\gui\qt\installwizard.py", line 106, in func_wrapper
    out = func(*args, **kwargs)
  File "...\electrum\electrum\gui\qt\installwizard.py", line 700, in show_xpub_dialog
    layout = SeedLayout(xpub, title=msg, icon=False, for_seed_words=False)
  File "...\electrum\electrum\gui\qt\seed_dialog.py", line 108, in __init__
    self.seed_e = ShowQRTextEdit(config=self.config)
AttributeError: 'SeedLayout' object has no attribute 'config'
2020-12-23 17:34:21 +01:00
SomberNight
21f13e21b1 wallet: fix bump_fee and dscancel for "not all inputs ismine" case
we fetch the missing prev txs over network

fixes #6551
fixes #6864
2020-12-20 15:29:41 +01:00
SomberNight
b28b3994c7 qt: move window.get{Open,Save}FileName to util
Sometimes we want its "remember path" behaviour but it does not make sense to
parent the dialog from main window. When so, caller code no longer needs to
get a reference to a main window.

Also rm last usages of get_parent_main_window().
2020-12-20 15:25:35 +01:00