From 70f8fd2d5f890013d3edee3583fd1d8c75ac2c3e Mon Sep 17 00:00:00 2001 From: jessop Date: Sat, 22 Feb 2020 00:11:15 -0500 Subject: [PATCH] properly transforms wallet server preference --- ui/redux/actions/app.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ui/redux/actions/app.js b/ui/redux/actions/app.js index 90e68d3ac..afd29b9fb 100644 --- a/ui/redux/actions/app.js +++ b/ui/redux/actions/app.js @@ -19,6 +19,7 @@ import { doPreferenceGet, doToast, doClearSupport, + SHARED_PREFERENCES, } from 'lbry-redux'; import Native from 'native'; import { doFetchDaemonSettings, doSetAutoLaunch, doSetDaemonSetting } from 'redux/actions/settings'; @@ -484,9 +485,15 @@ export function doGetAndPopulatePreferences() { dispatch(doPopulateSharedUserState(savedPreferences)); // @if TARGET='app' const { settings, sharing_3P: sharing3P } = savedPreferences.value; + // apply daemonSettings (todo: separate function) Object.entries(settings).forEach(([key, val]) => { if (val !== null && daemonSettings[key] !== val) { - dispatch(doSetDaemonSetting(key, val, true)); + if (key === SHARED_PREFERENCES.WALLET_SERVERS) { + const servers = val.map(item => `${item[0]}:${item[1]}`); + dispatch(doSetDaemonSetting(key, servers, true)); + } else { + dispatch(doSetDaemonSetting(key, val, true)); + } } }); if (sharing3P !== undefined) {