wallet_api: reject transaction file signing with hardware wallets

Reported by zkao, a tool by zkSecurity

(cherry picked from commit 735e535adf2c3d7d4c159478747c144e2aea6a69)
This commit is contained in:
selsta
2026-10-04 18:50:22 -04:00
committed by such-gitea
parent 809a263e11
commit a04ff495f7
+6
View File
@@ -76,6 +76,12 @@ bool UnsignedTransactionImpl::sign(const std::string &signedFileName)
m_status = Status_Error; m_status = Status_Error;
return false; return false;
} }
if(m_wallet.m_wallet->key_on_device())
{
m_errorString = tr("Command not supported by hardware wallet");
m_status = Status_Error;
return false;
}
std::vector<tools::wallet2::pending_tx> ptx; std::vector<tools::wallet2::pending_tx> ptx;
try try
{ {