Merge pull request #3688

841f061 main: remove outdated code (selsta)
This commit is contained in:
luigi1111 2022-06-09 13:52:52 -05:00
commit ab69b9c9b2
No known key found for this signature in database
GPG key ID: F4ACA0183641E010

View file

@ -321,27 +321,6 @@ ApplicationWindow {
function connectWallet(wallet) {
currentWallet = wallet
// TODO:
// When the wallet variable is undefined, it yields a zero balance.
// This can scare users, restart the GUI (as a quick fix).
//
// To reproduce, follow these steps:
// 1) Open the GUI, load up a wallet that has a balance
// 2) Settings -> close wallet
// 3) Create a new wallet
// 4) Settings -> close wallet
// 5) Open the wallet from step 1
if(!wallet || wallet === undefined || wallet.path === undefined){
informationPopup.title = qsTr("Error") + translationManager.emptyString;
informationPopup.text = qsTr("Couldn't open wallet: ") + 'please restart GUI.';
informationPopup.icon = StandardIcon.Critical
informationPopup.open()
informationPopup.onCloseCallback = function() {
appWindow.close();
}
}
walletName = usefulName(wallet.path)
viewOnly = currentWallet.viewOnly;