Commit Graph

4359 Commits

Author SHA1 Message Date
ghost43 b828627dc6 Merge pull request #6917 from andrewkozlik/slip39
SLIP-0039 wallet recovery
2021-06-22 19:44:02 +02:00
SomberNight 60e0cd65cf slip39: follow-ups
- fix kivy wizard restore-from-seed
- qt seed dialog: disable "next share" if current share is invalid
- fix tests: file paths should not depend on $PWD (working dir)
2021-06-22 19:24:16 +02:00
SomberNight 57e52da77f lnaddr: clean-up SEGWIT_HRP vs BOLT11_HRP confusion
With signet, SEGWIT_HRP != BOLT11_HRP, so the previous "currency" string
became a flawed concept. Instead we pass around net objects now.
2021-06-22 16:16:21 +02:00
ghost43 5dff461aaa Merge pull request #7282 from wakiyamap/add_signet
add signet support
2021-06-22 16:15:38 +02:00
tiagotrs f9734f5611 rephrasing, removal of revealer website links (#7359)
* rephrasing, removal of website links

* don't open pdf automatically
2021-06-21 17:26:52 +00:00
SomberNight ba8af9310f kivy addresses list: add "funded or unused" filter option
note: "Funded or Unused" shortened to "Funded|Unused" to save horizontal space
2021-06-19 16:19:24 +02:00
Chris 3ff537465b qt addresses list: add "funded or unused" filter option 2021-06-19 15:50:08 +02:00
SomberNight 90579ccfea kivy: fix paying bip70 invoices
this is a regression from #7234
2021-06-19 14:57:15 +02:00
SomberNight 2c8f376d3d prepare release 4.1.4 2021-06-17 14:03:06 +02:00
SomberNight 66f68d6b1f commands: fix "close_wallet" cmd, which was deadlocking
fixes #7348
2021-06-17 12:35:31 +02:00
SomberNight c49d6995d2 kivy: fixes regression where non-LN wallet cannot open settings...
fixes https://github.com/spesmilo/electrum/issues/6262#issuecomment-863087368
2021-06-17 11:48:58 +02:00
SomberNight d55fce4edd prepare release 4.1.3 2021-06-16 14:50:39 +02:00
SomberNight fbd8c5f7b0 imported wallets: respect "use_change" option; default off
Imported wallets used to send change back to the "from address".
We keep this behaviour as default.

There has already been an option "Use change addresses" (exposed in GUI),
ignored so far by imported wallets (was only used by HD wallets).
With this change, imported wallets no longer ignore that option, and if set,
they will send change to a random unused imported address, instead of back to "from address".
If all addresses are used, it falls back to sending change back to the "from address".

see: https://github.com/spesmilo/electrum/pull/7330
see: https://github.com/spesmilo/electrum/issues/5353
2021-06-11 20:12:43 +02:00
SomberNight 8941ba90bd (trivial) wallet: rename parameter of a method
Re get_change_addresses_for_new_transaction,
"allow_reuse" is a confusing parameter name:
it means whether we allow reusing already used change addresses to send new change to.
However, if the method returns [], we will instead reuse the "from address" and send change there.
So it quite unclear without thinking it through what "allow_reuse" means as it could be either
of the two (and they are ~opposite scenarios).
The new name is long but at least it is clear.
2021-06-11 18:23:25 +02:00
SomberNight 3adb309d49 kivy settings: more intuitive "recoverable channels" toggle
Previously if the wallet did not have a deterministic node id,
the wallet info dialog could say "lightning enabled, non-recoverable channels", but
the "recoverable channels" setting could be toggled and might even say "yes".
2021-06-11 15:00:06 +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
ThomasV ad06398e4e lnworker: rm unused import 2021-06-11 12:27:05 +00:00
ghost43 8abbcbff5a Merge pull request #7292 from bitromortac/2105-inflight-htlcs
lnrouter: add inflight htlcs to liquidity hints
2021-06-10 16:54:48 +00:00
SomberNight 7ee4a2e299 follow-up prev 2021-06-10 18:52:12 +02:00
SomberNight f52c0fd571 lnchannel: rm HTLC value upper limit of ~42 mBTC
closes #7328
closes #7100
see https://github.com/lightningnetwork/lightning-rfc/pull/877#issuecomment-857577075
2021-06-10 17:26:04 +02:00
ghost43 c43896fe6a Merge pull request #7263 from SomberNight/202104_android
reproducible build for Android apk
2021-06-10 13:19:41 +00:00
SomberNight 3c9346cce2 android build: attempt at reproducible builds 2021-06-09 18:34:09 +02:00
ThomasV 0f4f5e5fb7 Merge pull request #7341 from SomberNight/202106_issue7339
wallet: fix channels backups in .backup files
2021-06-09 17:38:50 +02:00
SomberNight 53d6eeb3f3 wallet: rm get_txout_address method 2021-06-08 16:45:30 +02:00
Nima 13e4424922 cmd: add sign with privkey and wallet (#7147)
* Remove check for sign with privkey in init_cmdline

* Add with_privkey and with_wallet variants of signtransaction command

* Add unit tests for signtransaction_with_privkey and signtransaction_with_wallet commands
2021-06-08 14:33:55 +00:00
SomberNight 34c2cb5220 wallet: fix channels backups in .backup files
This is a regression from https://github.com/spesmilo/electrum/commit/64a931f21e6f6699f192158e54ff8f2883682604,
which introduced "onchain_channel_backups", and renamed
the old "channel_backups" key to "imported_channel_backups".

The `save_backup` method was not changed to use the new "imported_channel_backups" key,
so the channel backups are in the backup file but they are ignored.
2021-06-08 16:21:43 +02:00
SomberNight 7e6d65ec11 wallet: RBF batching to only consider RBF-opted-in txs, even if local
This is easier to understand; the special case is not worth it.

related https://github.com/spesmilo/electrum/issues/7298
2021-06-07 20:11:56 +02:00
Thorsten Hempel fbf76af2c5 Update wallet backup access (#7300) 2021-06-07 16:46:25 +00:00
SomberNight 6c69c73a9f wallet: add address corruption tests for imported wallets too
related: https://github.com/spesmilo/electrum/issues/7338
2021-06-07 18:30:24 +02:00
SomberNight a425ab0301 invoices/lnaddr: LNInvoice.from_bech32 now raises InvoiceError
rm LnAddressError

fixes https://github.com/spesmilo/electrum/issues/7321
related https://github.com/spesmilo/electrum/pull/7234
2021-06-07 14:46:30 +02:00
SomberNight eb6b4580e8 fix tests: adapt to breaking change of ipaddress.ip_address in py3.9.5
fixes https://github.com/spesmilo/electrum/issues/7307

We can simply remove that test as we don't actually care whether the
leading zeroes are allowed.

see https://github.com/python/cpython/commit/60ce8f0be6354ad565393ab449d8de5d713f35bc
see https://bugs.python.org/issue36384
2021-06-05 08:01:38 +02:00
ghost43 e7c7a2a834 Merge pull request #7308 from bitromortac/2105-fix-cmd-reverse-swap
swaps: fix satoshi conversion bug
2021-06-05 05:35:46 +00:00
SomberNight cd50472b18 kivy: (fix) forbid creating LN payreq if LN is disabled for wallet
fix #6346

see https://github.com/spesmilo/electrum/issues/6346#issuecomment-854655931
2021-06-04 14:11:19 +02:00
bitromortac 3c02f6b922 swaps: fix satoshi conversion bug 2021-05-19 07:27:54 +02:00
SomberNight cad4e77853 fix prev 2021-05-15 06:57:59 +02:00
SomberNight b2169b745e wallet: (fix) "batch_rbf" must not mutate LN funding txs
The "Batch RBF transactions" feature mutates existing "local" and "unconfirmed RBF"
transactions when creating new transactions: it simply adds the new outputs to the
existing txs (and updates the change).
The "RBF" flag is only enforced for unconfirmed txs, not for local txs.
The bug was that given a local LN funding tx, when creating a new channel
with "batch_rbf" enabled, we would modify the existing local tx, and
broadcast that.

related: #7298
2021-05-15 06:31:03 +02:00
bitromortac 2749ea4d49 lnrouter: add inflight htlcs to liquidity hints 2021-05-11 09:17:11 +02:00
bitromortac 591a36fb3b lnworker: async gen create_routes_for_payments 2021-05-10 09:32:41 +02:00
wakiyamap 9f4d7ec6d1 Add net.BOLT11_HRP 2021-05-08 11:53:58 +09:00
SomberNight 9c1a51547a kivy: (trivial) clean-up imports in screens.py 2021-05-06 18:19:55 +02:00
SomberNight 3b0209a3a5 follow-up prev 2021-05-06 18:18:52 +02:00
bitromortac 853e912885 invoice: fail gracefully with large amount 2021-05-06 15:37:17 +02:00
bitromortac 6ce96306ca util: check bip21 url for amount 2021-05-06 15:37:17 +02:00
wakiyamap 639cd94dcb add signet support 2021-05-06 19:47:22 +09:00
Andrew Kozlik 2de82a2fd6 Add SLIP-0039 unit tests. 2021-04-30 19:55:47 +02:00
Andrew Kozlik 0dce13a1dd Implement SLIP-0039 wallet recovery. 2021-04-30 19:55:47 +02:00
Andrew Kozlik 19d04546df Replace from_bip39_seed() with from_bip43_rootseed(). 2021-04-30 19:43:53 +02:00
Andrew Kozlik be7a332624 Add SLIP-0039 wordlist. 2021-04-30 19:43:53 +02:00
SomberNight ef3293ab6a kivy: relocate atlas so it can be made a submodule later 2021-04-30 16:44:32 +02:00
jpph 0a56404f28 bip39 auto import, add coolwallet S weird derivation path (#7261)
auto import, add coolwallet S weird derivation path #7259

Would be nice to auto detect also coolwallet S derivation path.
In file bip39_wallet_formats.json :
{ "description": "coolwallet S derivation path using bip44 but with segwit script format",
"derivation_path": "m/44'/0'/0'",
"script_type": "p2wpkh-p2sh",
"iterate_accounts": true
}
see https://help.coolwallet.io/article/160-recover-btc-using-coolwallet-s-seed-without-the-wallet for their recovery instruction
2021-04-30 13:13:01 +00:00