Browse Source

follow-up moving some funcs from ecc.py to bitcoin.py (no. 2)

follow-up 2f3d89f415
master
SomberNight 1 year ago
parent
commit
f091f23776
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 3
      electrum/plugins/trustedcoin/common_qt.py

3
electrum/plugins/trustedcoin/common_qt.py

@ -15,6 +15,7 @@ else:
from electrum.i18n import _ from electrum.i18n import _
from electrum.bip32 import BIP32Node from electrum.bip32 import BIP32Node
from electrum import bitcoin
from .trustedcoin import (server, ErrorConnectingServer, MOBILE_DISCLAIMER, TrustedCoinException) from .trustedcoin import (server, ErrorConnectingServer, MOBILE_DISCLAIMER, TrustedCoinException)
from electrum.gui.common_qt.plugins import PluginQObject from electrum.gui.common_qt.plugins import PluginQObject
@ -208,7 +209,7 @@ class TrustedcoinPluginQObject(PluginQObject):
def f(xprv): def f(xprv):
rootnode = BIP32Node.from_xkey(xprv) rootnode = BIP32Node.from_xkey(xprv)
key = rootnode.subkey_at_private_derivation((0, 0)).eckey key = rootnode.subkey_at_private_derivation((0, 0)).eckey
sig = key.ecdsa_sign_usermessage(message, is_compressed=True) sig = bitcoin.ecdsa_sign_usermessage(key, message, is_compressed=True)
return base64.b64encode(sig).decode() return base64.b64encode(sig).decode()
signatures = [f(x) for x in [xprv1, xprv2]] signatures = [f(x) for x in [xprv1, xprv2]]

Loading…
Cancel
Save