Commit Graph

7460 Commits

Author SHA1 Message Date
SomberNight
96bb1611c5 follow-up plugins changes: fix qml gui
follow-up https://github.com/spesmilo/electrum/pull/8713

```
  1.35 | E | __main__ | daemon.run_gui errored
Traceback (most recent call last):
  File "/home/user/wspace/electrum/./run_electrum", line 458, in handle_cmd
    d.run_gui()
  File "/home/user/wspace/electrum/electrum/daemon.py", line 623, in run_gui
    self.gui_object = gui.ElectrumGui(config=self.config, daemon=self, plugins=self._plugins)
  File "/home/user/wspace/electrum/electrum/util.py", line 482, in do_profile
    o = func(*args, **kw_args)
  File "/home/user/wspace/electrum/electrum/gui/qml/__init__.py", line 82, in __init__
    self.app = ElectrumQmlApplication(sys.argv, config=config, daemon=daemon, plugins=plugins)
  File "/home/user/wspace/electrum/electrum/gui/qml/qeapp.py", line 428, in __init__
    self.plugins.load_plugin('trustedcoin')
  File "/home/user/wspace/electrum/electrum/plugin.py", line 269, in load_plugin
    raise Exception(f"could not find plugin {name!r}")
Exception: could not find plugin 'trustedcoin'
```
2024-04-18 17:01:08 +00:00
SomberNight
8d07672345 plugin: load_plugin: better exception msg if not found 2024-04-18 16:53:48 +00:00
fuyangpengqi
91de8e70e5 chore: fix some typos in comments (#9014)
Signed-off-by: fuyangpengqi <995764973@qq.com>
2024-04-18 13:59:39 +00:00
SomberNight
407f3fcb04 follow-up prev 2024-04-17 14:36:21 +00:00
SomberNight
cda65a6a80 exchange_rate: historical rates: merge old+new data, don't overwrite
- CoinGecko restricted its historical API to last 365 days
  - we used to ask for, and get, the whole history, but now we can only ask for the last year
  - so change HTTP request to only ask for 365 days
- we cache historical rates to disk
  - previously we used to overwrite what is already stored, with the newly obtained data
  - now this is changed so that we merge the new data into the already stored data
2024-04-17 14:30:09 +00:00
Sander van Grieken
e0e00da004 lnworker: don't query DNS for .onion hosts (fixes #9002) 2024-04-16 13:57:00 +02:00
CoolCu
3f95ceab60 chore: fix some typos in comments
Signed-off-by: CoolCu <coolcui@qq.com>
2024-04-16 15:54:25 +08:00
Jamie C. Driver
17508086aa jade: update Jade api to 1.0.29
Updates cbor dependency to cbor2, required for modern linux/python
versions.
2024-04-15 12:10:06 +01:00
ThomasV
8759928ec0 Merge pull request #9000 from SomberNight/202404_ecc_schnorr
ecc: add bindings for schnorr sign/verify, and refactor
2024-04-15 11:57:29 +02:00
ThomasV
ff07a77cfc move virtualkeyboard plugin to other repo
add plugin metadata to electrum/plugins.json
2024-04-13 11:35:49 +02:00
ThomasV
c9820aeca0 Qt: add download_plugin_dialog 2024-04-13 11:35:49 +02:00
ThomasV
f959b53222 add contrib/make_plugin 2024-04-13 11:35:49 +02:00
ThomasV
ad774a49be external plugins: add methods to read image files 2024-04-13 11:35:49 +02:00
ThomasV
858d999d31 Allow external plugins
- borrows code brom ElectronCash
 - external plugins are imported as zip files
 - check hash from plugins.json file
2024-04-13 11:35:49 +02:00
ThomasV
3e7d4749cf turn classmethod 'find_all_plugins' into an instance method.
change 'use_' prefix to 'enable_plugin_'
2024-04-13 11:35:49 +02:00
SomberNight
fae672c60c ecc: make libsecp256k1 "schnorrsig" module only required when used
It would be simple to hard fail at import time if any of the interesting
libsecp modules are missing, as it was done before this commit. However,
some Linux distros (atm current ubuntu lts, 22.04) lack new enough libsecp.
Also, for now, we don't use the schnorr APIs yet anyway. Until we start
to rely on them more, it is feasible to only require them when they are
used.

I am hoping we will be able to revert this commit later though, to keep
things simple.
2024-04-12 16:57:51 +00:00
SomberNight
52f1a2ce25 ecc: add method "bip340_tagged_hash"
I decided to use the stdlib (hashlib) instead of libsecp for this,
as it is simple enough, and the former is faster on my PC.

Added a unit test that compares the two.
2024-04-12 14:20:45 +00:00
SomberNight
bd9d0ccc33 ecc: refactor/clean-up sign/verify APIs 2024-04-11 15:25:45 +00:00
SomberNight
e72210b5d2 ecc: clean-up return value checks 2024-04-11 15:25:41 +00:00
SomberNight
44e27ac8b5 ecc: add bindings for schnorr sign/verify
and require "schnorrsig" and "extrakeys" modules of libsecp256k1
2024-04-11 13:09:57 +00:00
accumulator
1c673884bf Merge pull request #8971 from nkuttler/8970_bitbox02_pairing
Call pairing dialog when necessary, fixes #8970
2024-04-08 16:12:30 +02:00
SomberNight
f495511886 safer os.chmod for wallet files and config: set perms before write
Set unix file permissions first, before writing data.
2024-04-08 14:09:00 +00:00
Sander van Grieken
6d37e464f3 payment_identifier: don't assume bip70_data exists in has_expired() 2024-04-08 13:58:55 +02:00
Sander van Grieken
79f9b499ff qt: focus reason can't be None (fixes #8962) 2024-04-08 13:48:03 +02:00
snoppy
81c943ae83 chore: fix typos 2024-03-29 10:16:47 +08:00
ThomasV
17599de611 save notes whenever modified, using 10s rate limiter. fixes #8951 2024-03-27 16:44:31 +01:00
Nicolas Kuttler
519437f46f Call pairing dialog when necessary, fixes #8970 2024-03-21 21:32:42 +01:00
Soren Stoutner
fd421e234d Change copyright email address to soren@debian.org. 2024-03-16 13:13:58 -07:00
ThomasV
61dc8b7c85 Merge pull request #8894 from SomberNight/202402_qetxdetails_rbf_localtx
qml: QETxDetails: defer to wallet.get_tx_info() for rbf/cpfp
2024-03-15 11:18:03 +01:00
ThomasV
dcdbb0fb9c Merge pull request #8909 from accumulator/qml_finalizer_options
qml: add tx options to ConfirmTxDialog, RbfBumpFeeDialog
2024-03-15 10:46:33 +01:00
SomberNight
9b08eec491 interface: (trivial) clean-up timeouts 2024-03-14 15:20:06 +00:00
SomberNight
fef895295f interface: also log cancellations in send_request 2024-03-14 12:52:11 +00:00
ThomasV
99f6dd5d5d Merge pull request #8943 from SomberNight/202403_release_notes_454
prepare release 4.5.4
2024-03-13 15:09:52 +01:00
ThomasV
80586d2ced Merge pull request #8944 from SomberNight/202403_swap_messages
swaps: homogenise gui messages
2024-03-13 15:07:37 +01:00
ghost43
745f9184e4 Merge pull request #8942 from SomberNight/202403_get_swap_by_funding_tx
swaps: fix get_swap_by_funding_tx, and types/type-hints
2024-03-13 13:55:18 +00:00
SomberNight
01155ac6f5 swaps: homogenise gui messages
see https://github.com/spesmilo/electrum/issues/8940
2024-03-13 13:52:40 +00:00
SomberNight
85ffbfc83f prepare release 4.5.4 2024-03-13 12:53:44 +00:00
SomberNight
4a71032318 swaps: expand docstring for reverse_swap 2024-03-13 12:27:10 +00:00
SomberNight
05599eeda5 swaps: fix get_swap_by_funding_tx, and types/type-hints
- funding txs having only one output is not true...
- batch_rbf can combine funding txs
2024-03-13 11:37:01 +00:00
SomberNight
58a1bdfec7 lnworker.check_mpp_status: add docstring
This explains why stopping_soon behaves sanely with hold-invoice-htlcs.
2024-03-12 15:28:31 +00:00
SomberNight
af6a1f3d01 swaps: use longer final_cltv_delta for client-normal-swap
This gives more time for the client to come back online.

see https://github.com/spesmilo/electrum/issues/8940

- re note on submarine_swaps.py#L53:
  lnpeer.Peer.maybe_fulfill_htlc only checks against MIN_FINAL_CLTV_DELTA_ACCEPTED(=144),
  so this increased cltv_delta is not enforced when receiving the htlc on ln.
  It is put in the invoice, so the sender is supposed to honour it ofc.
  It would be nice to enforce it (make the check in maybe_fulfill_htlc dependent on
  what was in the invoice).
2024-03-12 14:20:52 +00:00
st3b1t
9ad6688ce7 trt removed 2024-03-05 23:30:23 +01:00
ThomasV
8b2a596194 Merge pull request #8925 from SomberNight/202403_simplify_chan_dict
walletdb: chan dict: small clean-up (incl db upgrade)
2024-03-05 10:00:45 +01:00
SomberNight
30c9f5b6b1 walletdb: chan dict: small clean-up (incl db upgrade)
- "fail_htlc_reasons" was removed in 9b1c40e396
- "unfulfilled_htlcs": rm 2 dead items from the 4-tuple,
   and convert False value of forwarding_key
2024-03-01 16:28:46 +00:00
ThomasV
f6312366e6 swapserver: raise exception if client uses deprecated API 2024-03-01 17:25:37 +01:00
SomberNight
0faadc0469 lnpeer: fix some type hints
related https://github.com/spesmilo/electrum/pull/8924

note: "forwarding_key" can be stored as False. I think this is ugly and
might be better to do a storage upgrade to change those values to None.
2024-03-01 15:47:08 +00:00
ThomasV
c6802adbae qt wizard: set focus on next_button 2024-03-01 16:42:16 +01:00
ThomasV
fde5f5b9b7 lnpeer: fix #8825
In maybe_fulfill_htlc, return two items: (preimage, (payment_key, callback)).

Rationale: The caller needs a payment_key only if we return a callback.
If we do not, the caller should use the payment_key that was previously
stored in channel.unfulfilled_htlcs

Note that for trampoline onions, payment_key may contain the inner
or outer secret.
2024-03-01 14:53:10 +01:00
accumulator
d120492664 Merge pull request #8921 from levantah/levantah/del_bublina
Remove bublina Signet
2024-03-01 11:56:34 +01:00
Ahmed Levant
2dcffd1ef2 Remove bublina Signet
Fixes #8920
2024-03-01 11:21:49 +01:00