mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Merge bitcoin/bitcoin#25235: GetExternalSigner(): fail if multiple signers are found
292b1a3e9cGetExternalSigner(): fail if multiple signers are found (amadeuszpawlik) Pull request description: If there are multiple external signers, `GetExternalSigner()` will just pick the first one in the list. If the user has two or more hardware wallets connected at the same time, he might not notice this. This PR adds a check and fails with suitable message, forcing the user to disconnect all but one external signer, so that there is no ambiguity as to which external signer was used. ACKs for top commit: Sjors: tACK292b1a3e9cachow101: ACK292b1a3e9cTree-SHA512: e2a41d3eecc607d4f94e708614bed0f3545f7abba85f300c5a5f0d3d17d72c815259734accc5ca370953eacd290f27894ba2c18016f5e9584cd50fa1ec2fbb0b
This commit is contained in:
@@ -297,6 +297,10 @@ void CreateWalletActivity::create()
|
||||
} catch (const std::runtime_error& e) {
|
||||
QMessageBox::critical(nullptr, tr("Can't list signers"), e.what());
|
||||
}
|
||||
if (signers.size() > 1) {
|
||||
QMessageBox::critical(nullptr, tr("Too many external signers found"), QString::fromStdString("More than one external signer found. Please connect only one at a time."));
|
||||
signers.clear();
|
||||
}
|
||||
m_create_wallet_dialog->setSigners(signers);
|
||||
|
||||
m_create_wallet_dialog->setWindowModality(Qt::ApplicationModal);
|
||||
|
||||
Reference in New Issue
Block a user