mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-22 19:49:34 +00:00
wizardWalletInput: pick default wallet name that not exists
This commit is contained in:
parent
07a2369a26
commit
df7a369966
2 changed files with 3 additions and 3 deletions
|
@ -83,10 +83,10 @@ function walletPathExists(accountsDir, directory, filename, isIOS, walletManager
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function unusedWalletName(directory, filename, walletManager) {
|
function unusedWalletName(directory, filename, isIOS, walletManager) {
|
||||||
for (var i = 0; i < 100; i++) {
|
for (var i = 0; i < 100; i++) {
|
||||||
var walletName = filename + (i > 0 ? "_" + i : "");
|
var walletName = filename + (i > 0 ? "_" + i : "");
|
||||||
if (!walletManager.walletExists(directory + "/" + walletName + "/" + walletName)) {
|
if (!walletPathExists(directory, directory, walletName, isIOS, walletManager)) {
|
||||||
return walletName;
|
return walletName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ GridLayout {
|
||||||
walletName.error = !walletName.verify();
|
walletName.error = !walletName.verify();
|
||||||
walletLocation.error = !walletLocation.verify();
|
walletLocation.error = !walletLocation.verify();
|
||||||
walletLocation.text = appWindow.accountsDir;
|
walletLocation.text = appWindow.accountsDir;
|
||||||
walletName.text = Wizard.unusedWalletName(appWindow.accountsDir, defaultAccountName, walletManager);
|
walletName.text = Wizard.unusedWalletName(appWindow.accountsDir, defaultAccountName, isIOS, walletManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.LineEdit {
|
MoneroComponents.LineEdit {
|
||||||
|
|
Loading…
Reference in a new issue