electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit f5817c7796ba1ca50570f336624bcef1583bdb53
parent 9f6e174b4ffd5bff6280b205b9168ac765c27c80
Author: ThomasV <thomasv@electrum.org>
Date:   Wed,  4 Oct 2017 12:33:45 +0200

Merge pull request #2979 from jrkong/utc-8_encoding_fix

Fixed syntax error with utf-8 encoding argument
Diffstat:
Mgui/qt/main_window.py | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py @@ -1912,7 +1912,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): def do_verify(self, address, message, signature): address = address.text().strip() - message = message.toPlainText().strip().encode('utf8') + message = message.toPlainText().strip().encode('utf-8') if not bitcoin.is_address(address): self.show_message('Invalid Bitcoin address.') return @@ -1971,11 +1971,11 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): def do_decrypt(self, message_e, pubkey_e, encrypted_e, password): cyphertext = encrypted_e.toPlainText() 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): message = message_e.toPlainText() - message = message.encode('utf8') + message = message.encode('utf-8') try: encrypted = bitcoin.encrypt_message(message, pubkey_e.text()) encrypted_e.setText(encrypted.decode('ascii')) @@ -2051,8 +2051,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): self.pay_to_URI(data) return # else if the user scanned an offline signed tx - # transactions are binary, but qrcode seems to return utf8... - data = data.decode('utf8') + # transactions are binary, but qrcode seems to return utf-8... + data = data.decode('utf-8') z = bitcoin.base_decode(data, length=None, base=43) data = bh2u(''.join(chr(ord(b)) for b in z)) tx = self.tx_from_text(data)