This is purely informational and optional, with the main immediate use to provide the
invoice description/message/label to the transaction dialog, so it can be stored
when saving the tx in history, or passed along with PSBTs sent to cosigners.
Before, the tx description was not saved in history when an invoice was not saved before
signing and saving the tx for sending later.
Checks if the pubkey of the author sending the psbt cosigning
request is in our list of cosigner pubkeys to prevent accepting
"fake" requests from other pubkeys.
lightning: implicit save of lightning invoice with override amount deferred until actual payment is accepted.
on-chain: for now, invoice is implicitly saved when override amount is passed to ConfirmTxDialog. (this is sooner
than current desktop client, which saves - and only saves - when Pay is clicked from ConfirmTxDialog)
disable the checkbox by default, so that if a user selects Enable Proxy
in the advanced network settings, and then just clicks next with the proxy
checkbox set, doesn't end up with a invalid proxy configuration which
doesn't connect to the server and has to be fixed manually.
the edit label button did crash the application because get_string
returned bytes instead of a string. The delete button was not
implemented but shown in the tui.
if payment amount is not set and the user tried to pay, the application
would crash. This shows a message instead. Also uses show_message
instead of show_error, as show_error doesn't exist.
This script scans the whole codebase for unicode characters and
errors if it finds any, unless the character is specifically whitelisted.
The motivation is to protect against homoglyph attacks, invisible unicode characters,
bidirectional and other control characters, and other malicious unicode usage.
Given that we mostly expect to use ASCII characters in the source code,
the most robust and generic fix seems to be to just ban all unicode usage.
see https://trojansource.codes/ :
> Compilers, interpreters, and build pipelines supporting Unicode should throw errors or warnings
> for unterminated bidirectional control characters in comments or string literals,
> and for identifiers with mixed-script confusable characters.
> Language specifications should formally disallow unterminated bidirectional
> control characters in comments and string literals.
> Code editors and repository frontends should make bidirectional control characters
> and mixed-script confusable characters perceptible with visual symbols or warnings.
also https://github.com/maltfield/detect-malicious-unicode
Adds functionality that allows the user to store the plugin authorization pubkey without having to edit files/registry manually.
On Linux systems it spawns the commands in a subprocess with pkexec which will trigger a OS prompt to execute the commands as root.
The user sees the executed commands and can either authorize with the root password or decline.
On windows it uses the windows `ShellExecuteExW` api to edit the registry, this also triggers a OS dialog to accept or decline (UAC dialog).
There is also functionality to reset the key again, which works in the same way.
37.23 | E | txbatcher.TxBatch | TxBatch error: AttributeError("'TxOutput' object has no attribute 'is_change'")
Traceback (most recent call last):
File "/opt/electrum/electrum/txbatcher.py", line 248, in run
await self.run_iteration()
File "/opt/electrum/electrum/txbatcher.py", line 379, in run_iteration
base_tx = self.find_base_tx()
File "/opt/electrum/electrum/txbatcher.py", line 369, in find_base_tx
self._new_base_tx(tx)
File "/opt/electrum/electrum/json_db.py", line 48, in wrapper
return func(self, *args, **kwargs)
File "/opt/electrum/electrum/txbatcher.py", line 518, in _new_base_tx
if tx.has_change():
File "/opt/electrum/electrum/transaction.py", line 1276, in has_change
return len(self.get_change_outputs()) > 0
File "/opt/electrum/electrum/transaction.py", line 1273, in get_change_outputs
return [o for o in self._outputs if o.is_change]
File "/opt/electrum/electrum/transaction.py", line 1273, in <listcomp>
return [o for o in self._outputs if o.is_change]
AttributeError: 'TxOutput' object has no attribute 'is_change'