Skip to content

Commit 2a22f03

Browse files
author
avirgovi
committed
parsing external signer master fingerprint string as bytes instead of caring for lower/upper case in ExternalSigner::SignTransaction
1 parent 74d9f4b commit 2a22f03

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/external_signer.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,12 @@ bool ExternalSigner::SignTransaction(PartiallySignedTransaction& psbtx, std::str
7474
// Serialize the PSBT
7575
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
7676
ssTx << psbtx;
77-
77+
// parse ExternalSigner master fingerprint
78+
std::vector<unsigned char> parsed_m_fingerprint = ParseHex(m_fingerprint);
7879
// Check if signer fingerprint matches any input master key fingerprint
7980
auto matches_signer_fingerprint = [&](const PSBTInput& input) {
8081
for (const auto& entry : input.hd_keypaths) {
81-
if (m_fingerprint == strprintf("%08x", ReadBE32(entry.second.fingerprint))) return true;
82+
if (parsed_m_fingerprint == MakeUCharSpan(entry.second.fingerprint)) return true;
8283
}
8384
return false;
8485
};

0 commit comments

Comments
 (0)