electrum

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

commit 355e77b39daff67c682e35b630fc6801cda92730
parent 9edffd17542de5773e7284a8c8a2673c766bb3c3
Author: ThomasV <thomasv@electrum.org>
Date:   Thu, 23 Nov 2017 19:32:39 +0100

Merge pull request #3362 from SomberNight/dbb_py3_hid_send

fix: py3 digitalbitbox hid_send
Diffstat:
Mplugins/digitalbitbox/digitalbitbox.py | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/plugins/digitalbitbox/digitalbitbox.py b/plugins/digitalbitbox/digitalbitbox.py @@ -11,7 +11,7 @@ try: from electrum.i18n import _ from electrum.keystore import Hardware_KeyStore from ..hw_wallet import HW_PluginBase - from electrum.util import print_error + from electrum.util import print_error, to_string import time import hid @@ -365,6 +365,7 @@ class DigitalBitbox_Client(): r = self.hid_read_frame() r = r.rstrip(b' \t\r\n\0') r = r.replace(b"\0", b'') + r = to_string(r, 'utf8') reply = json.loads(r) except Exception as e: print_error('Exception caught ' + str(e)) @@ -379,6 +380,7 @@ class DigitalBitbox_Client(): reply = self.hid_send_plain(msg) if 'ciphertext' in reply: reply = DecodeAES(secret, ''.join(reply["ciphertext"])) + reply = to_string(reply, 'utf8') reply = json.loads(reply) if 'error' in reply: self.password = None