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.
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')
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.
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.
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.
"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...)".
`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.
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.
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