mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-27 07:23:25 +00:00
Fixed syntax error with utf-8 encoding argument was spelt "utf8" instead of "utf-8". This will cause the reader to read the files using default encoding rather then utf-8.
This commit is contained in:
parent
91ed74a95f
commit
1cf1f05938
1 changed files with 5 additions and 5 deletions
|
@ -1912,7 +1912,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
||||||
|
|
||||||
def do_verify(self, address, message, signature):
|
def do_verify(self, address, message, signature):
|
||||||
address = address.text().strip()
|
address = address.text().strip()
|
||||||
message = message.toPlainText().strip().encode('utf8')
|
message = message.toPlainText().strip().encode('utf-8')
|
||||||
if not bitcoin.is_address(address):
|
if not bitcoin.is_address(address):
|
||||||
self.show_message('Invalid Bitcoin address.')
|
self.show_message('Invalid Bitcoin address.')
|
||||||
return
|
return
|
||||||
|
@ -1971,11 +1971,11 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
||||||
def do_decrypt(self, message_e, pubkey_e, encrypted_e, password):
|
def do_decrypt(self, message_e, pubkey_e, encrypted_e, password):
|
||||||
cyphertext = encrypted_e.toPlainText()
|
cyphertext = encrypted_e.toPlainText()
|
||||||
task = partial(self.wallet.decrypt_message, pubkey_e.text(), cyphertext, password)
|
task = partial(self.wallet.decrypt_message, pubkey_e.text(), cyphertext, password)
|
||||||
self.wallet.thread.add(task, on_success=lambda text: message_e.setText(text.decode('utf8')))
|
self.wallet.thread.add(task, on_success=lambda text: message_e.setText(text.decode('utf-8')))
|
||||||
|
|
||||||
def do_encrypt(self, message_e, pubkey_e, encrypted_e):
|
def do_encrypt(self, message_e, pubkey_e, encrypted_e):
|
||||||
message = message_e.toPlainText()
|
message = message_e.toPlainText()
|
||||||
message = message.encode('utf8')
|
message = message.encode('utf-8')
|
||||||
try:
|
try:
|
||||||
encrypted = bitcoin.encrypt_message(message, pubkey_e.text())
|
encrypted = bitcoin.encrypt_message(message, pubkey_e.text())
|
||||||
encrypted_e.setText(encrypted.decode('ascii'))
|
encrypted_e.setText(encrypted.decode('ascii'))
|
||||||
|
@ -2051,8 +2051,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
||||||
self.pay_to_URI(data)
|
self.pay_to_URI(data)
|
||||||
return
|
return
|
||||||
# else if the user scanned an offline signed tx
|
# else if the user scanned an offline signed tx
|
||||||
# transactions are binary, but qrcode seems to return utf8...
|
# transactions are binary, but qrcode seems to return utf-8...
|
||||||
data = data.decode('utf8')
|
data = data.decode('utf-8')
|
||||||
z = bitcoin.base_decode(data, length=None, base=43)
|
z = bitcoin.base_decode(data, length=None, base=43)
|
||||||
data = bh2u(''.join(chr(ord(b)) for b in z))
|
data = bh2u(''.join(chr(ord(b)) for b in z))
|
||||||
tx = self.tx_from_text(data)
|
tx = self.tx_from_text(data)
|
||||||
|
|
Loading…
Add table
Reference in a new issue