Commit Graph

398 Commits

Author SHA1 Message Date
ThomasV bc1ec6ac34 Qt: fix running GUI offline 2021-02-28 13:34:24 +01:00
ghost43 0ce6adffcc Merge pull request #6968 from HardCorePawn/issue6664
Added fiat fee estimate to Advanced Preview
2021-02-27 08:31:17 +00:00
SomberNight f9f49daad7 tx dialog: uniform high fee warnings between GUIs 2021-02-26 19:02:24 +01:00
SomberNight fc3009918c follow-up prev: some clean-up 2021-02-26 16:44:07 +01:00
hcp e01a2014b1 qt tx dialog: also display fiat amounts 2021-02-26 16:43:46 +01:00
SomberNight 8fe7d750f7 qt: move RBF dialog out of main_window.py into its own file 2021-02-25 15:32:03 +01:00
SomberNight 4a8286c744 qrscanner: nicer error messages 2021-02-23 22:38:53 +01:00
ThomasV ded449233e Trampoline routing.
- trampoline is enabled by default in config, to prevent download of `gossip_db`.
   (if disabled, `gossip_db` will be downloaded, regardless of the existence of channels)
 - if trampoline is enabled:
    - the wallet can only open channels with trampoline nodes
    - already-existing channels with non-trampoline nodes are frozen for sending.
 - there are two types of trampoline payments: legacy and end-to-end (e2e).
 - we decide to perform legacy or e2e based on the invoice:
    - we use trampoline_routing_opt in features to detect Eclair and Phoenix invoices
    - we use trampoline_routing_hints to detect Electrum invoices
 - when trying a legacy payment, we add a second trampoline to the path to preserve privacy.
   (we fall back to a single trampoline if the payment fails for all trampolines)
 - the trampoline list is hardcoded, it will remain so until `trampoline_routing_opt` feature flag is in INIT.
 - there are currently only two nodes in the hardcoded list, it would be nice to have more.
 - similar to Phoenix, we find the fee/cltv by trial-and-error.
    - if there is a second trampoline in the path, we use the same fee for both.
    - the final spec should add fee info in error messages, so we will be able to fine-tune fees
2021-02-17 17:28:13 +01:00
SomberNight 914eb9989d wallet: minor clean-up of tx.set_rbf() calls
Better to always call it, to make sure inputs have identical sequence numbers.
2021-02-12 04:59:40 +01:00
ThomasV 0c93394513 rename lnworker._pay to pay_invoice, call it directly from GUIs 2021-02-07 12:09:37 +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 986de70529 Qt: fix invoices refresh (follow-up 94708f63e4) 2021-01-24 11:40:02 +01:00
SomberNight bc6f2926f4 commands: add 'freeze_utxo' cmd; to expose this to CLI/RPC 2021-01-22 21:56:11 +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 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 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
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
SomberNight 096d853482 qt: rm some usages of get_parent_main_window
instead, pass around the main window or config (whichever is actually needed)

fixes #6342
2020-12-20 15:25:31 +01:00
SomberNight d40bedb2ac also support uppercase bip21 URIs
related https://github.com/btcpayserver/btcpayserver/issues/2110
2020-12-09 16:09:12 +01:00
SomberNight 5b9c972499 qt StatusBarButton: use custom theme for macOS if using default theme 2020-12-09 12:41:19 +01:00
SomberNight 6f14375a68 qt StatusBarButton: use QToolButton instead of QPushButton
related: #6299
2020-12-09 12:15:55 +01:00
ThomasV 1684b348df Qt: keep pending_invoice logic in main_window (follow-up 56579c2, fixes #5829) 2020-12-08 13:12:57 +01:00
ThomasV 56579c282e Qt: do not save pending invoice before the user has confirmed payment 2020-12-05 19:27:54 +01:00
SomberNight 7e18e2ea31 qt main_window: (trivial) fix error-handling for open_channel
fixes #6776
2020-11-25 10:03:49 +01:00
Benoît Verret a1c02e2c45 Fix daemon being treated as a function (#6771)
daemon was improperly turned into a function in the Python console.
Point daemon to window.gui_object.daemon instead.
2020-11-24 20:24:44 +00:00
SomberNight 9fced6d2b1 qt send tab: "max" btn should not raise NotEnoughFunds due to fees
If a tx cannot be constructed due to current fee settings, try to
create one with zero miner fees instead and let user to change the
fee later.

fixes #6755
2020-11-21 19:35:27 +01:00
SomberNight 16a326cdd3 qt receive tab: rename "create onchain" btn to "New Address" 2020-11-18 18:58:37 +01:00
ThomasV aaff48720f Qt lightning invoice dialog: make payment_hash copiable 2020-11-18 11:47:47 +01:00
SomberNight c872c3194f qt "open channel" dialog: detect invalid remote node id sooner
and avoid the "please wait" text to be interpreted as a node id

related #6705
2020-11-13 19:21:37 +01:00
ThomasV ea654ad740 Merge pull request #6705 from bitromortac/lnrater
lightning: reintroduce node recommendation
2020-11-09 10:06:13 +01:00
bitromortac f36d7872c3 qt: move local node id to info menu 2020-11-06 08:00:24 +01:00
bitromortac cc9e19409f lnrater: module for node rating
Introduces LNRater, which analyzes the Lightning Network graph for
potential nodes to connect to by taking into account channel capacities,
channel open times and fee policies. A score is constructed to assign a
scalar to each node, which is then used to perform a weighted random
sampling of the nodes.
2020-11-06 08:00:23 +01:00
SomberNight 802fe8c73a qt user interface: send tab: change "Pay" button text to "Pay..."
Ellipsis ("...") is sometimes used in UIs to suggest there will be an
additional modal dialog before executing the action.
2020-10-29 01:58:34 +01:00
SomberNight b95525896f qt send tab: show friendlier error on mistyped bitcoin address 2020-10-25 04:24:31 +01:00
ThomasV f155f3aff5 start lngossip if instantiated; this saves a boolean 2020-10-22 18:48:27 +02:00
bitromortac 1855bcb17d qt: reflect running gossip in lightning icon 2020-10-22 18:05:51 +02:00
bitromortac bba995ada3 qt: remove enable/disable button 2020-10-22 18:05:51 +02:00
bitromortac 3314c149f2 qt: show channels tab by default if ln wallet 2020-10-22 18:05:51 +02:00
SomberNight f125a06453 wallet: simplify get_wallet_delta 2020-10-18 20:37:29 +02:00