main: remove minor switch/case code duplication

This commit is contained in:
selsta 2021-04-24 08:25:12 +02:00
parent bc1131ce41
commit 7558a23243
No known key found for this signature in database
GPG key ID: 2EA0A99A8B07AE5E

View file

@ -534,12 +534,6 @@ ApplicationWindow {
// try to resolve common wallet cache errors automatically // try to resolve common wallet cache errors automatically
switch (wallet.errorString) { switch (wallet.errorString) {
case "basic_string::_M_replace_aux": case "basic_string::_M_replace_aux":
walletManager.clearWalletCache(wallet.path);
walletPassword = passwordDialog.password;
appWindow.initialize();
console.error("Repairing wallet cache with error: ", wallet.errorString);
appWindow.showStatusMessage(qsTr("Repairing incompatible wallet cache. Resyncing wallet."),6);
return;
case "std::bad_alloc": case "std::bad_alloc":
walletManager.clearWalletCache(wallet.path); walletManager.clearWalletCache(wallet.path);
walletPassword = passwordDialog.password; walletPassword = passwordDialog.password;