SomberNight
eefb68c82b
transaction: change Transaction.is_segwit_input(txin) to txin.is_segwit()
2020-10-24 08:03:13 +02:00
ThomasV
59f7d4b02d
fix #6676 and remove dead code
2020-10-23 11:31:04 +02:00
ThomasV
5d90790726
wallet.py: always instantiate lnbackups
2020-10-22 18:35:49 +02:00
bitromortac
4efcb53d24
network: load gossip db early
...
The gossip db is loaded early when the network is started to save
time when the gui is locked and a wallet not yet loaded. Side effects
of the LNWallet to start peering when a channel db is loaded is
circumvented.
2020-10-22 18:05:51 +02:00
bitromortac
6045de759b
lightning: enable by default but without gossip
...
Enables lightning by creating a node private key and storing it in
the wallet. The gossiper is not launched at start up, only if there
are existing channels.
2020-10-22 18:05:51 +02:00
SomberNight
f125a06453
wallet: simplify get_wallet_delta
2020-10-18 20:37:29 +02:00
SomberNight
e71fa4924f
wallet: rm wallet.txin_value
2020-10-18 20:37:21 +02:00
SomberNight
bde415cae7
wallet: don't try to get_input_tx from network when offline
...
related: https://github.com/spesmilo/electrum/issues/6648#issuecomment-708499893
Trying to fetch the prev tx from the network is a blocking operation with
a 10 sec timeout - we should not hang for 10 seconds if there is no network connection.
2020-10-14 19:30:10 +02:00
ghost43
83143f421a
Merge pull request #6641 from SomberNight/202010_dscancel
...
wallet: implement cancelling tx by double-spending to self ("dscancel")
2020-10-13 17:42:10 +00:00
SomberNight
4b6c86ecbe
wallet: make labels private, and access to need lock
...
e.g. labels plugin iterated over wallet.labels on asyncio thread while user could trigger an edit from Qt thread
2020-10-13 18:57:55 +02:00
SomberNight
3a4f07c345
wallet: implement cancelling tx by double-spending to self ("dscancel")
2020-10-09 17:36:37 +02:00
SomberNight
ca5b93f07d
wallet: cpfp to send to a change address instead of receive address
2020-10-09 17:34:20 +02:00
SomberNight
ad03c1e3cb
wallet: (fix) bump_fee and cpfp now returns tx with all wallet-info
...
Previously e.g. bip32 derivation info was missing for change outputs in partial tx returned by bump_fee.
This was not exposed to users as the GUI TxDialog calls `tx.add_info_from_wallet(self.wallet)`.
2020-10-08 19:30:02 +02:00
MrNaif2018
6bd1a04aee
Pass wallet to invoice_status/request_status ( #6595 )
...
* Pass wallet to invoice_status/request_status
* Check for same wallet in qt gui
Co-authored-by: ghost43 <somber.night@protonmail.com>
2020-09-18 17:28:51 +00:00
SomberNight
6d86f4dc18
wallet set_tx_label_based_on_invoices: don't overwrite custom label
...
related: #6545
2020-08-31 22:00:52 +02:00
SomberNight
55eb62bb90
wallet.get_relevant_invoice_keys_for_tx: take lock in callee not caller
2020-08-31 21:58:47 +02:00
SomberNight
6b4edc650a
qt history: fixes for tx context-menu "View invoice" if more than one
...
fixes #6516
coalesce "View invoice" options into submenu if there are multiple;
also make sure lambda uses bound argument
2020-08-31 20:55:14 +02:00
SomberNight
c64da9448f
wallet: get_full_history should populate acq_price/cap_gains if enabled
...
fixes #6370
qt history tab is calling get_full_history; so this is needed to populate cap_gains columns
2020-08-24 18:17:05 +02:00
SomberNight
4961020e01
wallet: handle exception when deleting last addr from imported wallet
...
fixes #6347
2020-07-08 01:28:20 +02:00
SomberNight
35dad3c10e
qt history list: only offer "View Invoice" if still have invoice
...
fixes : #6343
2020-07-08 01:19:23 +02:00
SomberNight
dee5d52948
invoices: make sure that OnchainInvoice .exp and .time are not None
...
related: #6284
2020-06-27 02:27:50 +02:00
ThomasV
730bfda33a
OnchainInvoice: make get_amount_sat return 0 instead of None. fixes #6203
2020-06-26 11:14:23 +02:00
ThomasV
b0c390e231
wallet.clear_requests. fixes #6279
2020-06-26 09:47:16 +02:00
SomberNight
a97cb88a1a
qt sweep: raise more specific exception so that trace is not logged
...
When raising generic Exception, window.on_error can't tell whether
there was a programming error or we just want to communicate with the user.
E | gui.qt.main_window.[default_wallet] | on_error
Traceback (most recent call last):
File "/home/user/wspace/electrum/electrum/gui/qt/util.py", line 832, in run
result = task.task()
File "/home/user/wspace/electrum/electrum/gui/qt/main_window.py", line 2900, in <lambda>
task = lambda: self.network.run_from_another_thread(
File "/home/user/wspace/electrum/electrum/network.py", line 358, in run_from_another_thread
return fut.result(timeout)
File "/usr/lib/python3.8/concurrent/futures/_base.py", line 439, in result
return self.__get_result()
File "/usr/lib/python3.8/concurrent/futures/_base.py", line 388, in __get_result
raise self._exception
File "/home/user/wspace/electrum/electrum/wallet.py", line 162, in sweep_preparations
raise Exception(_('No inputs found.'))
Exception: No inputs found.
2020-06-25 23:48:24 +02:00
SomberNight
d31883a2ea
wallet.export_{request,invoice}: replace 'amount' field with sat/msat
...
(was failing as 'amount' was Decimal for LN invoices, which cannot be json-serialised)
2020-06-22 23:38:44 +02:00
SomberNight
d5f368c584
LN invoices: support msat precision
...
fixes #6250
2020-06-22 22:48:13 +02:00
ThomasV
4bda882695
Group swap transactions in Qt history ( fixes #6237 )
...
- use tree structure of QTreeView
- grouped items have a 'group_id' field
- rename 'Normal' swap as 'Forward'
2020-06-22 11:26:49 +02:00
SomberNight
1ace265992
wallet: simplify get_payment_status
2020-06-21 08:23:07 +02:00
SomberNight
5f2d347d81
submarine_swaps: wallet.get_unused_address -> get_receiving_address
2020-06-18 17:11:14 +02:00
ThomasV
cb4c8abe1c
submarine swaps: disable merging of transaction in history
...
This is too complicated and ugly because it relies on side
effects. What we should do instead is collapse transactions
in children nodes of QTreeView (see #6237 )
2020-06-18 14:28:40 +02:00
ThomasV
a1e8f9e2aa
swaps: mapping of prepay_hash to payment_hash
2020-06-18 14:28:40 +02:00
ThomasV
c8506eaa39
swaps: store fee_preimage
2020-06-18 14:28:40 +02:00
ThomasV
bcf2246633
minor fix
2020-06-18 14:28:40 +02:00
ThomasV
252591832a
swaps: improve history display
2020-06-18 14:28:40 +02:00
ThomasV
f8dd62aec0
show swaps as single line in history
...
main_window.run_coroutine_from_thread
2020-06-18 14:28:40 +02:00
SomberNight
43892dd61a
invoices: fix #6233
2020-06-14 03:39:35 +02:00
SomberNight
0b224ba685
invoices: minor clean-up (type hints, mark broken things)
...
also rm some dead code
2020-06-13 18:54:22 +02:00
SomberNight
906a2c15dc
sweeping via CLI: allow customising RBF
...
fixes #6231
2020-06-13 18:44:20 +02:00
ghost43
947af92126
tx dialog: show various warnings if input amounts cannot be verified ( #6217 )
...
see #5749
2020-06-08 14:24:41 +00:00
SomberNight
7bcb59ffb5
wallet: when sweeping, do network reqs in parallel, and don't block GUI
2020-06-05 20:30:25 +02:00
ThomasV
d9747a2ff1
wallet fixes for lightning disabled (follow up 6058829870
)
2020-06-05 15:04:33 +02:00
ThomasV
56f4932f10
import/exports to json files:
...
- fix #5737
- add import/export or requests
2020-06-05 13:17:01 +02:00
SomberNight
309ba15745
invoices: follow-up fixes re clean-up
...
follow-up 6058829870
and related
2020-06-03 21:00:03 +02:00
matejcik
e058ee2957
psbt: always include full prev tx ( #6198 )
...
* enable streaming full UTXOs for all types of inputs
Co-authored-by: SomberNight <somber.night@protonmail.com>
2020-06-03 18:03:12 +00:00
ThomasV
cc3da6c75f
follow-up prev
2020-06-03 18:48:27 +02:00
ThomasV
b6d56ece82
fix #6203 : do not let request amount be None
2020-06-03 18:20:20 +02:00
ThomasV
6058829870
Use attr.s classes for invoices and requests:
...
- storage upgrade
- fixes #6192
- add can_pay_invoice, can_receive_invoice to lnworker
2020-06-01 21:02:45 +02:00
ThomasV
8e3ee73daf
Merge pull request #6134 from SomberNight/202004_ln_fundingtx_forbid_bump_cjoin
...
wallet: disallow fee-bumping/coinjoining ln funding tx
2020-05-27 18:37:04 +02:00
SomberNight
ac63444cfc
wallet: better handle used change addresses reverting to unused
...
If a used/reserved change address became unused/unreserved, it would not
get offered for usage by wallet until app restart.
Make the used->unused transition less likely by requiring 3 confirmations
(instead of considering even local/unconfirmed txs for 'used');
and avoid removing reserved addresses from the pool altogether.
2020-05-25 17:42:11 +02:00
SomberNight
c14a704082
wallet: fix minor locking thing in set_reserved_state_of_address
...
follow-up 6040e953a3
2020-05-25 17:34:52 +02:00