File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -574,14 +574,11 @@ bool keystore_secp256k1_pubkey_hash160(
574
574
size_t keypath_len ,
575
575
uint8_t * hash160_out )
576
576
{
577
- if (keystore_is_locked ()) {
578
- return false;
579
- }
580
- struct ext_key xprv __attribute__((__cleanup__ (keystore_zero_xkey ))) = {0 };
581
- if (!_get_xprv_twice (keypath , keypath_len , & xprv )) {
577
+ struct ext_key xpub __attribute__((__cleanup__ (keystore_zero_xkey ))) = {0 };
578
+ if (!keystore_get_xpub (keypath , keypath_len , & xpub )) {
582
579
return false;
583
580
}
584
- memcpy (hash160_out , xprv .hash160 , sizeof (xprv .hash160 ));
581
+ memcpy (hash160_out , xpub .hash160 , sizeof (xpub .hash160 ));
585
582
return true;
586
583
}
587
584
@@ -590,14 +587,11 @@ bool keystore_secp256k1_pubkey_uncompressed(
590
587
size_t keypath_len ,
591
588
uint8_t * pubkey_out )
592
589
{
593
- if (keystore_is_locked ()) {
594
- return false;
595
- }
596
- struct ext_key xprv __attribute__((__cleanup__ (keystore_zero_xkey ))) = {0 };
597
- if (!_get_xprv_twice (keypath , keypath_len , & xprv )) {
590
+ struct ext_key xpub __attribute__((__cleanup__ (keystore_zero_xkey ))) = {0 };
591
+ if (!keystore_get_xpub (keypath , keypath_len , & xpub )) {
598
592
return false;
599
593
}
600
- return _compressed_to_uncompressed (xprv .pub_key , pubkey_out );
594
+ return _compressed_to_uncompressed (xpub .pub_key , pubkey_out );
601
595
}
602
596
603
597
bool keystore_secp256k1_nonce_commit (
You can’t perform that action at this time.
0 commit comments