1
0
Commit Graph

16502 Commits

Author SHA1 Message Date
Sander van Grieken
b1925f8747 payment_identifier: refactor round_3 to need_merchant_notify/notify_merchant 2023-06-28 16:49:28 +02:00
Sander van Grieken
7601726d29 payment_identifier: refactor round_2 to need_finalize/finalize stage 2023-06-28 16:49:28 +02:00
Sander van Grieken
508d1038d3 payment_identifier: define states, refactor round_1 into resolve stage 2023-06-28 16:49:28 +02:00
Sander van Grieken
3000b83ab5 contacts: use specific Exception when alias not found 2023-06-28 16:49:28 +02:00
Sander van Grieken
a2ca191de1 pass wallet to PaymentIdentifier instead of config and contacts 2023-06-28 16:49:28 +02:00
Sander van Grieken
ac341d9565 whitespace, code style 2023-06-28 16:49:28 +02:00
Sander van Grieken
cbd388c297 fix flake8 issues (undefined references) 2023-06-28 16:49:28 +02:00
Sander van Grieken
1e725b6baa break the cyclic dependency 2023-06-28 16:49:28 +02:00
ThomasV
15eb765eac payment_identifiers:
- this separates GUI from core handling
 - the PaymentIdentifier class handles network requests
 - the GUI is agnostic about the type of PI
2023-06-28 16:49:28 +02:00
Sander van Grieken
d83149f668 qml: add workaround for android predictive back gestures in History component
contributes to #8464
2023-06-28 16:14:05 +02:00
ThomasV
c4c2123b4b fix bundled payments:
- prepayment should be accepted immediately once bundle is here
 - mpp timeout all parts, but accept only current part
2023-06-28 14:51:09 +02:00
ThomasV
7caa6ccf57 test_lnpeer: fix variable names after rename 2023-06-28 13:22:42 +02:00
ThomasV
c4eb7d8321 lnworker: bundled payments
- htlcs of bundled payments must arrive in the same MPP_TIMEOUT
window, or they will be failed
- add correspoding tests
2023-06-28 13:01:37 +02:00
ThomasV
6c231e1d07 test_lnpeer: factorize code into TestPeer._activate_trampoline 2023-06-28 12:50:44 +02:00
ThomasV
24296ca7c0 test_lnpeer: follow-up 21e06b7065 2023-06-28 12:49:30 +02:00
ThomasV
14efb401d6 test_lnpeer: refactor tests for hold invoices 2023-06-28 12:10:30 +02:00
ThomasV
1acf426fa9 lnworker: add support for hold invoices
(invoices for which we do not have the preimage)

Callbacks and timeouts are registered with lnworker. If the
preimage is not known after the timeout has expired, the payment
is failed with MPP_TIMEOUT.
2023-06-26 11:09:47 +02:00
ThomasV
2b1199647e bitcoin.construct_script: add values parameter
(to be used in swapserver plugin)
2023-06-26 09:33:36 +02:00
ThomasV
df5b98792e lnworker: always call check_received_htlc (no only for MPP)
This will be a generic placeholder to decide if we need to wait
before settling a payment (to be used with hold invoices and
bundled payments)
2023-06-26 09:29:40 +02:00
ThomasV
21e06b7065 lnpeer: new payment secret, derived without preimage.
(this is needed for hold invoices)
2023-06-25 19:15:52 +02:00
ThomasV
97768a13b9 follow-up previous commit 2023-06-24 13:00:15 +02:00
ThomasV
b8b36c7c30 follow-up prev: fix flake8 test 2023-06-24 12:56:55 +02:00
ThomasV
411098f293 move methods from wallet_db to json_db
the goal of this commit is to call JsonDB.__init__ with data,
not an empty dict
2023-06-24 12:45:07 +02:00
SomberNight
c85139009a qt chan details dlg: make some more labels selectable 2023-06-23 20:02:25 +00:00
SomberNight
e2ee79c378 lnaddr: add LnAddr.to_debug_json() method 2023-06-23 19:53:38 +00:00
SomberNight
a3b0e97c88 lnaddr: make min_cltv logic less error-prone
round-tripping the value behaved unexpectedly before...
2023-06-23 19:53:34 +00:00
SomberNight
f7a8e55a6a lnworker: (trivial) clean-up which bolt-09 feature flags we set 2023-06-23 19:53:31 +00:00
SomberNight
ca93af2b8a ln: some clean-up for option_scid_alias
- qt chan details dlg: show both local and remote aliases
- lnchannel: more descriptive names, add clarification in doctstrings,
  and also save the "local_scid_alias" in the wallet file (to remember if
  we sent it)
- lnpeer:
  - resend channel_ready msg after reestablish, to upgrade old existing channels
    to having local_scid_alias
  - forwarding bugfix, to follow BOLT-04:
    > - if it returns a `channel_update`:
    >   - MUST set `short_channel_id` to the `short_channel_id` used by the incoming onion.
2023-06-23 19:51:57 +00:00
SomberNight
888291a8f8 qml: fix lnurl-pay when config.BTC_AMOUNTS_ADD_THOUSANDS_SEP is True
when paying an lnurl-pay that provides an amount interval,
the amount field is editable by the user and it expects no spaces
2023-06-23 16:23:12 +00:00
SomberNight
8075c0d02a lnurl: add encode_lnurl() for console usage, fix tests 2023-06-23 16:01:03 +00:00
ThomasV
759eaf1cf5 json_db: register extra types outside of constructor 2023-06-23 12:16:14 +02:00
SomberNight
1ff4130804 contrib/docker_notes.md: add notes re debian apt mirror, and envvars
related https://github.com/spesmilo/electrum/issues/8496
2023-06-22 15:45:30 +00:00
SomberNight
922981e586 lnpeer: improve logging in maybe_forward_htlc 2023-06-21 15:22:17 +00:00
ThomasV
4177f8be82 lnworker.create_routes_for_payment: fix MPP detection 2023-06-21 08:55:17 +02:00
gruve-p
fbf41b582a kivy: fix fx history rates 2023-06-20 09:28:13 +02:00
SomberNight
1e3f810667 update release notes for version 4.4.5 2023-06-19 17:30:06 +00:00
SomberNight
52817b220d update locale 2023-06-19 16:01:12 +00:00
ThomasV
cc57648a0c follow-up previous commit 2023-06-19 14:49:25 +02:00
ThomasV
39f8664402 make submarine swap server url configurable 2023-06-19 14:46:56 +02:00
ThomasV
606c51bc4e follow-up previous commit 2023-06-18 13:49:56 +02:00
ThomasV
295734fc53 storage: encapsulate type conversions of stored objects using
decorators (instead of overloading JsonDB._convert_dict and
 _convert_value)
 - stored_in for elements of a StoreDict
 - stored_as for singletons
 - extra register methods are defined for key conversions

This commit was adapted from the jsonpatch branch
2023-06-18 13:08:57 +02:00
SomberNight
079c0ce5b2 Merge branch '202306_trezor_coinjoin' 2023-06-15 14:03:53 +00:00
SomberNight
eef9680743 trezor plugin: support external pre-signed inputs
closes https://github.com/spesmilo/electrum/issues/8324
2023-06-14 17:03:47 +00:00
SomberNight
4a211adcaa trezor plugin: allow multiple change outputs
see https://github.com/spesmilo/electrum/issues/3920
2023-06-14 17:02:07 +00:00
SomberNight
09b9fb8374 exchange_rate: try harder to refresh quote when cache is expiring
Previously we polled every 2.5 minutes to get the fx spot price,
and had a 10 minute cache expiry during which the latest spot price
was valid.

On Android, this often resulted in having no price available (showing
"No data" in GUI) when putting the app in the foreground after e.g.
a half-hour sleep in the background: often there would be no fx price
until the next tick, which could take 2.5 minutes. (btw in some cases
I saw the application trying to get new quotes from the network as
soon as the app was put in the foreground but it seems those happened
so fast that the network was not ready yet and DNS lookups failed)

Now we make the behaviour a bit more complex: we still fetch the price
every 2.5 mins, and the cache is still valid for 10 mins, however if
the last price is >7.5 mins old, we become more aggressive and go into
an exponential backoff, initially trying a request every few seconds.
For the Android scenario, this means there might be "No data" for fx
for a few seconds after a long sleep, however if there is a working
network, it should soon get a fresh fx spot price quote.
2023-06-14 15:42:28 +00:00
SomberNight
03615c2cfc commands: onchain_history: reuse daemon.fx if available 2023-06-14 15:05:26 +00:00
SomberNight
87cba8bf32 trustedcoin: stricter client-side checks for 2fa fee 2023-06-13 16:52:50 +00:00
SomberNight
23f2412da7 qt: follow-up "rm thousand sep when copying numbers to clipboard"
follow-up https://github.com/spesmilo/electrum/pull/8479
2023-06-13 15:59:18 +00:00
ThomasV
5b5100eedc Merge pull request #8479 from thomasleveil/feat_copy_numbers
 remove thousand separator when copying numbers to clipboard
2023-06-13 14:40:17 +02:00
SomberNight
703ec09355 addr_sync: expand docstring for get_tx_fee 2023-06-13 00:24:56 +00:00