notably this is needed when the shell itself does not get a chance to expand "~",
e.g. when a path is passed via JSON-RPC
>>> os.path.normcase(os.path.realpath(os.path.abspath("~/.electrum/testnet/wallets/delete_me2")))
'/home/user/wspace/electrum/~/.electrum/testnet/wallets/delete_me2'
>>> os.path.normcase(os.path.realpath(os.path.abspath(os.path.expanduser("~/.electrum/testnet/wallets/delete_me2"))))
'/home/user/.electrum/testnet/wallets/delete_me2'
Traceback (most recent call last):
File "...\electrum\electrum\gui\qt\main_window.py", line 994, in <lambda>
self.create_invoice_button.clicked.connect(lambda: self.create_invoice(False))
File "...\electrum\electrum\gui\qt\main_window.py", line 1123, in create_invoice
key = self.create_bitcoin_request(amount, message, expiry)
File "...\electrum\electrum\gui\qt\main_window.py", line 1132, in create_bitcoin_request
addr = self.wallet.get_unused_address()
File "...\electrum\electrum\wallet.py", line 1452, in wrapper
addr = func(self, *args, **kwargs)
File "...\electrum\electrum\wallet.py", line 1465, in get_unused_address
addrs = self.get_unused_addresses()
File "...\electrum\electrum\wallet.py", line 1459, in get_unused_addresses
in_use_by_request = [k for k in self.receive_requests.keys() if self.get_request_status(k)[0] != PR_EXPIRED]
File "...\electrum\electrum\wallet.py", line 1459, in <listcomp>
in_use_by_request = [k for k in self.receive_requests.keys() if self.get_request_status(k)[0] != PR_EXPIRED]
File "...\electrum\electrum\wallet.py", line 1535, in get_request_status
if exp > 0 and time.time() > timestamp + exp:
TypeError: '>' not supported between instances of 'NoneType' and 'int'
scenario: enter extremely high feerate (which we cannot satisfy) then click into fee_edit.
At that moment, fee_edit is empty and both feerate_edit and fee_edit are considered frozen.
As fee_edit has priority, we would construct a tx with default fee.
Now, instead, we won't construct this default fee tx ~as if the click to fee_edit did not happen.
- We need only two types: PR_TYPE_ONCHAIN and PR_TYPE_LN
- BIP70 is no longer a type, but an optional field in the dict
- Invoices in the wallet are indexed by a hash of their serialized list of outputs.
- Requests are still indexed by address, because we never generate Paytomany requests.
- Add 'clear_invoices' command to CLI
- Add 'save invoice' button to Qt
- Terminology: use 'invoices' for outgoing payments, 'requests' for incoming payments
- At the GUI level, try to handle invoices in a generic way.
- Display ongoing payments in send tab.
- All requests have an expiration date
- Paid requests are automatically removed from the list
- Unpaid, unconfirmed and expired requests are displayed
- Fix a bug in get_payment_status, conf was off by one
* store invoices for both directions
* do not store lightning_payments_inflight, lightning_payments_completed in lnworker
* payment history is returned by get_payments method of LNChannel
* command line: lightning history, lightning_invoices
* re-enable push_msat
old style "-v" still works
filtering examples:
-v=debug,network=error,interface=error // effectively blacklists network and interface
-v=warning,network=debug,interface=debug // effectively whitelists network and interface