1
0
Commit Graph

16077 Commits

Author SHA1 Message Date
ThomasV
02f093c2d2 qml SwapDialog: move userinfo to the top, make it constant, add padding and labels below the slider 2023-04-01 13:46:46 +02:00
ThomasV
a753f34c09 Qt: rename utxo menu action to 'privacy analysis' 2023-04-01 12:47:30 +02:00
ThomasV
6d876da1c4 qml InvoiceDialog: update userinfo messages 2023-04-01 12:46:16 +02:00
ThomasV
d6cbaaa2e9 qml InvoiceDialog: show invoice type in the title, fallback address in the details 2023-04-01 12:26:46 +02:00
ThomasV
ad18298878 qml: Give user feedback after bumping the fee.
This is better than nothing, but not ideal. This window should
have a general purpose 'userinfo' field, like InvoiceDialog,
that would also display 'Broadcasting...' while the tx is being
broadcast.

Note that in order to bump the fee again, the user will have to
leave this window and open it again.
2023-04-01 12:10:35 +02:00
ThomasV
f396d15146 qml: (clarity) use separate slots for sign and sign_and_broadcast. 2023-04-01 12:03:50 +02:00
ThomasV
54bb42f82c adb: take locks in get_balance. fixes #8200 2023-04-01 10:37:38 +02:00
ThomasV
fb47346ed3 follow-up 2cbb16ae4b. fixes #8290 2023-04-01 09:43:52 +02:00
SomberNight
fc6cbb39ea qml: QEConfig.formatMilliSats to use config.format_amount 2023-03-31 22:17:53 +00:00
ThomasV
986955a6e8 qml: allow user to delete invoices and requests from the list screen
also, delete expired requests before loading list
2023-03-31 20:00:29 +02:00
ThomasV
d4aeeaf541 follow-up c98b9e8d7b
(unintended deletion)
2023-03-31 18:36:45 +02:00
SomberNight
0e5464ca13 android build: enable asserts, and add sanity-check for it
Note that 0f541be6f1 added a warning log if asserts are disabled.
It is intentional that these two things are in separate files:
We always want to log that warning, even if someone is using electrum as a library.
However, in that latter case, I think it's fine not to sys.exit(), but leave the decision up to the library user.

Similar thinking when running from source: let's log the warning but don't sys.exit().
2023-03-31 16:24:14 +00:00
ThomasV
847c8d4941 balance details: use onClicked event. Early return if balance is not available 2023-03-31 16:47:15 +02:00
ThomasV
c98b9e8d7b qml: dashboard
Balance details are shown if the user presses and holds the
balance area; the idea is that this should be less chaotic
than if the popup is triggerred by a simple click. However,
we might as well try with a simple click, because we already
do it with transaction details; I am not sure what is the best
option, we should try both.

This also makes 'new channel' and 'swap' buttons available from
theBalance details, so that users do not need to visit the
channels list.
2023-03-31 16:47:15 +02:00
Sander van Grieken
478937b8d2 make flake8 not not happy 2023-03-31 15:46:51 +02:00
Sander van Grieken
2bdc303662 qml: keep lnurlData even after bolt11 has been retrieved, add isLnurlPay property and save bolt11 before triggering pay 2023-03-31 15:39:29 +02:00
Sander van Grieken
ec2f903573 qml: force Pin dialog above other dialogs 2023-03-31 15:38:53 +02:00
Sander van Grieken
244ead2624 qml: auto-pay if entering InvoiceDialog from a lnurl-pay dialog 2023-03-31 15:05:05 +02:00
Sander van Grieken
cf2ba2a5bd qml: replace assert by exception 2023-03-31 15:05:05 +02:00
SomberNight
0f541be6f1 log a warning if asserts are disabled
Maybe we should refuse to start, if launched with the main script.
But note that __debug__ is False on Android atm, as python is launched with -OO.
2023-03-31 13:03:26 +00:00
ThomasV
56e685feaa invoices: Use the same base method to export invoices and requests.
This fixes an inconsistency where the 'expiration' field was
relative for invoices, and absolute timestamp for requests.

This in turn fixes QML the timer refreshing the request list.

In order to prevent any API using that field from being silently
broken, the 'expiration' field is renamed as 'expiry'.
2023-03-31 14:55:08 +02:00
ThomasV
2cda5a1a7b Merge pull request #8287 from SomberNight/202303_qt_netdlg_icon_selected
qt network dialog: use icon for selected server, instead of "*"
2023-03-31 14:43:17 +02:00
Sander van Grieken
168efa6cb4 qml: handle scenario for non-lightning wallet scanning lightning invoice with fallback address 2023-03-31 14:42:03 +02:00
Sander van Grieken
b1b71002e6 qml: followup b8aa87ded8 2023-03-31 14:06:12 +02:00
SomberNight
771ffa371c qml: mempool histogram color bar: show tooltips
to teach meanings of colours and positions in the bar
2023-03-31 11:55:33 +00:00
SomberNight
f7e7b4c9db qml: mempool histogram color bar: flip sign in feerate label
I think this is more intuitive as a "greater than" relation sign
than to use a signal that the label is for the leftmost point in the coloured bar.
As in, "feerates not displayed towards that direction are even higher than this value".
2023-03-31 11:55:30 +00:00
Sander van Grieken
b8aa87ded8 qml: handle phase-2 lnurl errors from within WalletMainView, add sanity check on
the bolt11 invoice we get from the service
2023-03-31 13:21:11 +02:00
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
31fde2484f qt network dialog: use icon for selected server, instead of "*"
Previously we added a " *" suffix to distinguish the selected/main server
in the list. However in case of an .onion address, anything we put as a
suffix inline is elided/truncated - as the address itself does not fit.
Hence we could instead use a prefix - and then why not use an icon.
2023-03-30 14:56:33 +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