1
0

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

follow-up 2f3d89f415
This commit is contained in:
SomberNight
2024-09-06 17:05:23 +00:00
parent a674a22155
commit f091f23776

View File

@@ -15,6 +15,7 @@ else:
from electrum.i18n import _
from electrum.bip32 import BIP32Node
from electrum import bitcoin
from .trustedcoin import (server, ErrorConnectingServer, MOBILE_DISCLAIMER, TrustedCoinException)
from electrum.gui.common_qt.plugins import PluginQObject
@@ -208,7 +209,7 @@ class TrustedcoinPluginQObject(PluginQObject):
def f(xprv):
rootnode = BIP32Node.from_xkey(xprv)
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()
signatures = [f(x) for x in [xprv1, xprv2]]