mirror of
https://github.com/feather-wallet/feather.git
synced 2024-12-22 19:49:28 +00:00
trezor: close trezor suite on failure to acquire
This commit is contained in:
parent
35f0ee406c
commit
efae6ae70f
1 changed files with 10 additions and 2 deletions
|
@ -270,7 +270,12 @@ void WindowManager::onWalletOpened(Wallet *wallet) {
|
||||||
errMsg = QString("%1\n\nAttempted to clean wallet cache. Please restart Feather.").arg(errMsg);
|
errMsg = QString("%1\n\nAttempted to clean wallet cache. Please restart Feather.").arg(errMsg);
|
||||||
this->handleWalletError({nullptr, Utils::ERROR, "Unable to open wallet", errMsg});
|
this->handleWalletError({nullptr, Utils::ERROR, "Unable to open wallet", errMsg});
|
||||||
} else {
|
} else {
|
||||||
this->handleWalletError({nullptr, Utils::ERROR, "Unable to open wallet", errMsg});
|
QStringList helpItems = {};
|
||||||
|
if (errMsg == "Failed to acquire device") {
|
||||||
|
helpItems.append("Try closing Trezor suite");
|
||||||
|
}
|
||||||
|
|
||||||
|
this->handleWalletError({nullptr, Utils::ERROR, "Unable to open wallet", errMsg, helpItems});
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -340,7 +345,7 @@ void WindowManager::tryCreateWallet(Seed seed, const QString &path, const QStrin
|
||||||
}
|
}
|
||||||
|
|
||||||
if (seed.mnemonic.isEmpty()) {
|
if (seed.mnemonic.isEmpty()) {
|
||||||
this->handleWalletError({nullptr, Utils::ERROR, "Failed to create wallet", "Mnemonic seed is emopty"});
|
this->handleWalletError({nullptr, Utils::ERROR, "Failed to create wallet", "Mnemonic seed is empty"});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -455,6 +460,9 @@ void WindowManager::onWalletCreated(Wallet *wallet) {
|
||||||
link = "https://wiki.trezor.io/Udev_rules";
|
link = "https://wiki.trezor.io/Udev_rules";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
else if (error.contains("Failed to acquire device")) {
|
||||||
|
helpItems = {"Try closing Trezor suite"};
|
||||||
|
}
|
||||||
if (error.contains("SW_CLIENT_NOT_SUPPORTED")) {
|
if (error.contains("SW_CLIENT_NOT_SUPPORTED")) {
|
||||||
helpItems = {"Upgrade your Ledger device firmware to the latest version using Ledger Live.\n"
|
helpItems = {"Upgrade your Ledger device firmware to the latest version using Ledger Live.\n"
|
||||||
"Then upgrade the Monero app for the Ledger device to the latest version."};
|
"Then upgrade the Monero app for the Ledger device to the latest version."};
|
||||||
|
|
Loading…
Reference in a new issue