Settings.wallet: convert old user & pass strings

This commit is contained in:
joeuhren
2020-11-23 21:01:18 -07:00
parent 8247192d68
commit b65f8c0105
+12
View File
@@ -208,6 +208,18 @@ exports.reloadSettings = function reloadSettings() {
//we know this setting, so we overwrite it
if(exports[i] !== undefined)
{
// This check uses old .user and .pass config strings if they exist, and .username, .password don't.
if (i == 'wallet')
{
if (!settings.wallet.hasOwnProperty('username') && settings.wallet.hasOwnProperty('user'))
{
settings.wallet.username = settings.wallet.user;
}
if (!settings.wallet.hasOwnProperty('password') && settings.wallet.hasOwnProperty('pass'))
{
settings.wallet.password = settings.wallet.pass;
}
}
exports[i] = settings[i];
}
//this setting is unkown, output a warning and throw it away