commit 3c281c4056f94476a1352b89d284bfd0559206fd
parent ddc989c672231392c07ab26c5721ac8b9605407e
Author: ThomasV <thomasv@electrum.org>
Date: Thu, 19 Oct 2017 06:30:50 +0200
Merge pull request #3065 from SomberNight/py3_cosignerpool
py3: cosigner_pool
Diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/plugins/cosigner_pool/qt.py b/plugins/cosigner_pool/qt.py
@@ -37,7 +37,7 @@ from electrum import transaction
from electrum.plugins import BasePlugin, hook
from electrum.i18n import _
from electrum.wallet import Multisig_Wallet
-from electrum.util import bh2u
+from electrum.util import bh2u, bfh
from electrum_gui.qt.transaction_dialog import show_transaction
@@ -177,7 +177,7 @@ class Plugin(BasePlugin):
for window, xpub, K, _hash in self.cosigner_list:
if not self.cosigner_can_sign(tx, xpub):
continue
- message = bitcoin.encrypt_message(tx.raw, K)
+ message = bitcoin.encrypt_message(bfh(tx.raw), bh2u(K)).decode('ascii')
try:
server.put(_hash, message)
except Exception as e:
@@ -209,9 +209,9 @@ class Plugin(BasePlugin):
if not xprv:
return
try:
- k = bitcoin.deserialize_xprv(xprv)[-1].encode('hex')
- EC = bitcoin.EC_KEY(k.decode('hex'))
- message = EC.decrypt_message(message)
+ k = bh2u(bitcoin.deserialize_xprv(xprv)[-1])
+ EC = bitcoin.EC_KEY(bfh(k))
+ message = bh2u(EC.decrypt_message(message))
except Exception as e:
traceback.print_exc(file=sys.stdout)
window.show_message(str(e))