mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-30 17:01:34 +00:00
follow up 08543584c5
This commit is contained in:
parent
08543584c5
commit
03c66bb5f9
1 changed files with 10 additions and 7 deletions
|
@ -161,7 +161,7 @@ class Imported_KeyStore(Software_KeyStore):
|
||||||
return pubkey
|
return pubkey
|
||||||
|
|
||||||
def get_xpubkey(self, c, i):
|
def get_xpubkey(self, c, i):
|
||||||
return self.get_public_key((c,i)).encode('hex')
|
return self.get_public_key((c,i))
|
||||||
|
|
||||||
def get_private_key(self, sequence, password):
|
def get_private_key(self, sequence, password):
|
||||||
for_change, i = sequence
|
for_change, i = sequence
|
||||||
|
@ -174,8 +174,11 @@ class Imported_KeyStore(Software_KeyStore):
|
||||||
return pk
|
return pk
|
||||||
|
|
||||||
def get_pubkey_derivation(self, x_pubkey):
|
def get_pubkey_derivation(self, x_pubkey):
|
||||||
if x_pubkey[0:2] != 'fd':
|
if x_pubkey[0:2] in ['02', '03', '04']:
|
||||||
return
|
if x_pubkey in self.receiving_pubkeys:
|
||||||
|
i = self.receiving_pubkeys.index(x_pubkey)
|
||||||
|
return (False, i)
|
||||||
|
elif x_pubkey[0:2] == 'fd':
|
||||||
# fixme: this assumes p2pkh
|
# fixme: this assumes p2pkh
|
||||||
_, addr = xpubkey_to_address(x_pubkey)
|
_, addr = xpubkey_to_address(x_pubkey)
|
||||||
for i, pubkey in enumerate(self.receiving_pubkeys):
|
for i, pubkey in enumerate(self.receiving_pubkeys):
|
||||||
|
|
Loading…
Add table
Reference in a new issue