From a04ff495f7e5e7f147fb84f34091b5e4d62998dc Mon Sep 17 00:00:00 2001 From: selsta Date: Mon, 3 Aug 2026 18:37:11 +0200 Subject: [PATCH] wallet_api: reject transaction file signing with hardware wallets Reported by zkao, a tool by zkSecurity (cherry picked from commit 735e535adf2c3d7d4c159478747c144e2aea6a69) --- src/wallet/api/unsigned_transaction.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wallet/api/unsigned_transaction.cpp b/src/wallet/api/unsigned_transaction.cpp index 4c9d3571e..ed2740cb5 100644 --- a/src/wallet/api/unsigned_transaction.cpp +++ b/src/wallet/api/unsigned_transaction.cpp @@ -76,6 +76,12 @@ bool UnsignedTransactionImpl::sign(const std::string &signedFileName) m_status = Status_Error; 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 ptx; try {