diff options
author | fanquake <fanquake@gmail.com> | 2022-08-13 16:04:59 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2022-08-13 16:08:19 +0100 |
commit | dc9d6626835ec2864dfa747c12071dabdc95b919 (patch) | |
tree | 1d4e4394c92797b4adb3a905b7000b39948a80e9 /src/qt/walletcontroller.cpp | |
parent | aca0200e9408d802ce68c323ee6edeb93699ecb3 (diff) | |
parent | 292b1a3e9c98b9ba74b28d149df8554d4ad8e5c0 (diff) | |
download | bitcoin-dc9d6626835ec2864dfa747c12071dabdc95b919.tar.xz |
Merge bitcoin/bitcoin#25235: GetExternalSigner(): fail if multiple signers are found
292b1a3e9c98b9ba74b28d149df8554d4ad8e5c0 GetExternalSigner(): 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:
tACK 292b1a3e9c98b9ba74b28d149df8554d4ad8e5c0
achow101:
ACK 292b1a3e9c98b9ba74b28d149df8554d4ad8e5c0
Tree-SHA512: e2a41d3eecc607d4f94e708614bed0f3545f7abba85f300c5a5f0d3d17d72c815259734accc5ca370953eacd290f27894ba2c18016f5e9584cd50fa1ec2fbb0b
Diffstat (limited to 'src/qt/walletcontroller.cpp')
-rw-r--r-- | src/qt/walletcontroller.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qt/walletcontroller.cpp b/src/qt/walletcontroller.cpp index 443941d3c4..8762ba9ab3 100644 --- a/src/qt/walletcontroller.cpp +++ b/src/qt/walletcontroller.cpp @@ -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); |