electrum

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

commit 6f083a712d6757d7c011f6e4a1bc65d620245197
parent 4cfe98216ea4aa078df343e5676595e3c61891ce
Author: ThomasV <thomasv@electrum.org>
Date:   Mon, 30 Jan 2017 10:16:18 +0100

trezor: use serialize_xpub

Diffstat:
Mplugins/trezor/clientbase.py | 7++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/plugins/trezor/clientbase.py b/plugins/trezor/clientbase.py @@ -4,7 +4,7 @@ from struct import pack from electrum.i18n import _ from electrum.util import PrintError, UserCancelled from electrum.keystore import bip39_normalize_passphrase -from electrum.bitcoin import EncodeBase58Check +from electrum.bitcoin import serialize_xpub class GuiMixin(object): @@ -151,10 +151,7 @@ class TrezorClientBase(GuiMixin, PrintError): address_n = self.expand_path(bip32_path) creating = False #self.next_account_number() == 0 node = self.get_public_node(address_n, creating).node - xpub = ("0488B21E".decode('hex') + chr(node.depth) - + self.i4b(node.fingerprint) + self.i4b(node.child_num) - + node.chain_code + node.public_key) - return EncodeBase58Check(xpub) + return serialize_xpub(0, node.chain_code, node.public_key, node.depth, self.i4b(node.fingerprint), self.i4b(node.child_num)) #def address_from_derivation(self, derivation): # return self.get_address('Bitcoin', self.expand_path(derivation))