1
0
Commit Graph

16049 Commits

Author SHA1 Message Date
Sander van Grieken
e476e60247 qml: add note regarding validity of qetxdetails instance and reset tx/txid members 2023-03-31 12:47:43 +02:00
Sander van Grieken
d99a220c66 qml: add new 'removed_transaction' callback in wallet.py, hook up callback in qewallet and
emit balanceChanged events for add_transaction and remove_transaction
2023-03-31 12:32:02 +02:00
Sander van Grieken
a1da0c0150 qml: virtual keyboard ~20% bigger 2023-03-31 11:01:47 +02:00
Sander van Grieken
df44a5c361 qml: port over 'show_qr to warn if QR code is missing data' 2023-03-31 10:50:11 +02:00
ThomasV
ea46d3c318 qml create request: if no address is available, show how to access
the list of pending requests.
2023-03-31 10:22:16 +02:00
ThomasV
1babc96913 qml: rename Invoices -> Saved Invoices, Receive Requests -> Pending Requests 2023-03-31 10:14:49 +02:00
ThomasV
83dbf36d99 follow-up 4647fda04f 2023-03-31 10:07:05 +02:00
SomberNight
4a626a113d qt receive_tab: fix "show_address_on_hw" functionality
follow-up b07fe970bf

I don't like this being hidden in the toolbar menu.
The other items in the toolbar menu are ~settings or generic actions
independent of the current request. This one is dependent on the
current request, and even the active "tab"... does not make sense
to show this when the lightning tab is active.
It is more difficult to discover it in the first place than previously,
and it being less visible goes against encouraging hw device users of
using it, which is what we should be doing.

Anyway, this commit just makes it functional as-is.
2023-03-31 01:14:08 +00:00
SomberNight
bcd2ec3d70 (trivial) qt/util: add some leftover type-hints 2023-03-31 01:04:54 +00:00
SomberNight
8a394c3e3f update locale 2023-03-30 16:38:19 +00:00
SomberNight
84d19457a6 lnpeer: handle NoDynamicFeeEstimates in co-op close
note that the existing fallback was insufficient as config.fee_per_kb() can still return None
2023-03-30 15:40:45 +00:00
SomberNight
8291018c0e interface: workaround electrs erroring on 'blockchain.estimatefee'
15.00 | E | i/interface.[electrum.blockstream.info:50002] | Exception in run: ProtocolError(-32600, 'ill-formed response error object: cannot estimate fee for 25 blocks')
Traceback (most recent call last):
  File "...\electrum\electrum\util.py", line 1261, in wrapper
    return await func(*args, **kwargs)
  File "...\electrum\electrum\interface.py", line 516, in wrapper_func
    return await func(self, *args, **kwargs)
  File "...\electrum\electrum\interface.py", line 539, in run
    await self.open_session(ssl_context)
  File "...\electrum\electrum\interface.py", line 689, in open_session
    async with self.taskgroup as group:
  File "...\aiorpcX\aiorpcx\curio.py", line 304, in __aexit__
    await self.join()
  File "...\electrum\electrum\util.py", line 1423, in join
    task.result()
  File "...\electrum\electrum\interface.py", line 726, in request_fee_estimates
    async with OldTaskGroup() as group:
  File "...\aiorpcX\aiorpcx\curio.py", line 304, in __aexit__
    await self.join()
  File "...\electrum\electrum\util.py", line 1423, in join
    task.result()
  File "...\electrum\electrum\interface.py", line 1128, in get_estimatefee
    res = await self.session.send_request('blockchain.estimatefee', [num_blocks])
  File "...\electrum\electrum\interface.py", line 171, in send_request
    response = await asyncio.wait_for(
  File "...\Python310\lib\asyncio\tasks.py", line 408, in wait_for
    return await fut
  File "...\aiorpcX\aiorpcx\session.py", line 540, in send_request
    return await self._send_concurrent(message, future, 1)
  File "...\aiorpcX\aiorpcx\session.py", line 512, in _send_concurrent
    return await future
  File "...\aiorpcX\aiorpcx\jsonrpc.py", line 721, in receive_message
    item, request_id = self._protocol.message_to_item(message)
  File "...\aiorpcX\aiorpcx\jsonrpc.py", line 273, in message_to_item
    return cls._process_response(payload)
  File "...\aiorpcX\aiorpcx\jsonrpc.py", line 220, in _process_response
    raise cls._error(code, message, False, request_id)
aiorpcx.jsonrpc.ProtocolError: (-32600, 'ill-formed response error object: cannot estimate fee for 25 blocks')
2023-03-30 15:34:27 +00:00
SomberNight
0a3e286f1d qt tx dialog: show_qr to warn if QR code is missing data
When exporting a tx as qr code, the prev txs are omitted to save space.
This causes problems with offline signers: software electrum signers will
just warn and then proceed, but hw devices will typically error.
2023-03-30 14:32:31 +00:00
ThomasV
4647fda04f qml: show invoices/requests lists through long press
I think we can re-enable the requests list, because requests
are now created explicitly by pressing the create request button.

Since this is an advanced feature, it should not be in the way of
people who do not want to see it. Here is a solution that might
work.
2023-03-30 16:09:59 +02:00
Sander van Grieken
8a2372a133 followup 4517b3c2bb 2023-03-30 16:05:10 +02:00
Sander van Grieken
4517b3c2bb qml: handle DataOverflow in qeqr.py and QRImage 2023-03-30 16:00:36 +02:00
Sander van Grieken
d064b38f1c qml: split updating userinfo from determine_can_pay, check determine_can_pay also in event handlers 2023-03-30 13:23:14 +02:00
Sander van Grieken
c08ca94591 qml: support create & save transaction on watch-only wallet, refactor showExport and supply
relevant help text when sharing a transaction
2023-03-30 12:28:09 +02:00
ThomasV
6bec498560 qml: use the same button for copy and paste 2023-03-30 12:26:35 +02:00
ThomasV
5ef7fabc73 qml InvoiceDialog: merge status and userinfo 2023-03-30 11:24:50 +02:00
Sander van Grieken
2cbb16ae4b qml: move save_tx to qewallet 2023-03-30 10:41:01 +02:00
Sander van Grieken
e40ab26bd3 qml: qenetwork log server_status only when changing, log network_status updates 2023-03-30 09:29:02 +02:00
SomberNight
bd725b50d1 update block header checkpoints 2023-03-30 01:28:56 +00:00
SomberNight
81761c2ef1 qml: BalanceSummary to treat server_status=="connecting" same as DC-ed 2023-03-30 00:59:20 +00:00
SomberNight
3149ccf729 qml: update server in network dialog on more events
"defaultServerChanged" was not the right event to listen to. It is only sent
*after* the interface is ready.
"network_updated" is a bit overkill as it is triggered every time any of the
interfaces goes down or a new one is created, still, better to trigger a
few more times than to be stale.
In particular, if there is no internet connection, the server string is now
updated as expected, instead of showing stale values and ignoring trying
to change servers.
Also, a further state that did not exist before: just like it worked in
the kivy GUI, if the main server was changed but it is not yet connected,
instead of showing the old server still, we now show f"{new_server} (connecting...)".
2023-03-30 00:59:16 +00:00
SomberNight
04df286519 interface: fix ServerAddr.from_str_with_inference() for raw IPv6 addr
and add tests
2023-03-30 00:59:13 +00:00
SomberNight
101958e022 qt network_dialog: fix right-click "Use as server" for raw IPv6 servers
`server.net_addr_str()` cuts off the trailing protocol marker, while `str(server)` has it.
`parent.set_server` then called `ServerAddr.from_str_with_inference` trying to guess the just cut off protocol,
but fails if given an IPv6 address.
2023-03-30 00:59:10 +00:00
SomberNight
44f91ab88f qml: add TODO about --offline missing 2023-03-30 00:59:06 +00:00
SomberNight
1530668960 qt/qml: delay starting network until after first-start-network-setup
The qt, qml, and kivy GUIs have a first-start network-setup screen
that allows the user customising the network settings before creating a wallet.
Previously the daemon used to create the network and start it, before this screen,
before the GUI even starts. If the user changed network settings, those would
be set on the already running network, potentially including restarting the network.

Now it becomes the responsibility of the GUI to start the network, allowing this
first-start customisation to take place before starting the network at all.
The qt and the qml GUIs are adapted to make use of this. Kivy, and the other
prototype GUIs are not adapted and just start the network right away, as before.
2023-03-30 00:59:02 +00:00
SomberNight
9ef6d6a56f qml: rm QEConfig.serverString. Network.server is sufficient
If there is no network object, it's ok not to be able to customise it.
2023-03-30 00:58:58 +00:00
SomberNight
d46d23b103 network: add method init_parameters_from_config 2023-03-30 00:58:54 +00:00
SomberNight
d189fdce69 qml: crash reporter: fix "show never" option
102.82 | E | gui.qml.qeapp.Exception_Hook | exception caught by crash reporter
Traceback (most recent call last):
  File "/home/user/wspace/electrum/electrum/gui/qml/qeapp.py", line 271, in showNever
    self.config.set_key(BaseCrashReporter.config_key, False)
AttributeError: 'QEAppController' object has no attribute 'config'
2023-03-30 00:58:51 +00:00
Sander van Grieken
cc60ab0b20 qml: move payment progress info text updates fully into qeinvoice, qeinvoice now updates itself
directly from backend wallet callbacks
2023-03-29 19:08:11 +02:00
Sander van Grieken
7efd6fe1e2 qml: don't show ln payment dialog, update info text instead 2023-03-29 19:08:11 +02:00
SomberNight
57786049e9 qml: network dialog to update "status" more often 2023-03-29 16:41:20 +00:00
SomberNight
faa53c71da qml: (trivial) fix warning in NetworkOverview.qml
10.95 | W | gui.qml.qeapp | file:///home/user/wspace/electrum/electrum/gui/qml/components/NetworkOverview.qml:220:25: Unable to assign [undefined] to QString
2023-03-29 16:41:17 +00:00
SomberNight
37d0a67e5b qml: proxy config: fix socks4/socks5 dropdown 2023-03-29 16:41:13 +00:00
SomberNight
512b63c424 exchange_rate: FxThread does not need network 2023-03-29 16:41:09 +00:00
SomberNight
f4e66810e7 qml: ElectrumGui to inherit BaseElectrumGui 2023-03-29 16:41:04 +00:00
Sander van Grieken
05d6c5155c qml: use invoice.amount directly in amounts display 2023-03-29 18:05:55 +02:00
ThomasV
7fcf347eb0 qml: channel details dialog: clarify whether object is a channel or a channel backup 2023-03-29 16:49:10 +02:00
ThomasV
a270bb5c43 qml swap dialog: show normal swap amount without mining fee, to be consistent with the qt GUI. 2023-03-29 16:27:40 +02:00
ThomasV
5721b7da4b qml: add userinfo to invoices where amount needs to be filled by user 2023-03-29 12:15:07 +02:00
Sander van Grieken
288b7cd3bc qml: show explanatory text when sharing partially signed tx
after creating a multisig transaction
2023-03-29 11:39:40 +02:00
Sander van Grieken
aaad1cf286 qml: wrap long server names (e.g tor onion address) 2023-03-29 11:15:52 +02:00
ThomasV
31bff4d2a8 receive_tab: initialize fields 2023-03-29 11:10:00 +02:00
Sander van Grieken
ea7dbb19ce qml: remove network status indicator icon from server line 2023-03-29 11:02:15 +02:00
SomberNight
f25e384654 build: fail if not inside git clone
related: https://github.com/spesmilo/electrum/issues/8284
2023-03-28 22:35:19 +00:00
SomberNight
fc7ff8198a build: don't assume git repo in make_packages.sh
to be able to run it from an unpacked sdist
2023-03-28 22:35:15 +00:00
SomberNight
5fd6d2af4b qml: flip and fix auto_connect in ServerConnectWizard 2023-03-28 14:44:21 +00:00