diff options
Diffstat (limited to 'app/scripts/controllers/preferences.js')
-rw-r--r-- | app/scripts/controllers/preferences.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/scripts/controllers/preferences.js b/app/scripts/controllers/preferences.js index b21cdfb36..2faf8220b 100644 --- a/app/scripts/controllers/preferences.js +++ b/app/scripts/controllers/preferences.js @@ -408,7 +408,11 @@ class PreferencesController { rpcList.splice(index, 1) } if (url !== 'http://localhost:8545') { - rpcList.push({ rpcUrl: url, chainId, ticker, nickname }) + let checkedChainId + if (!!chainId && !Number.isNaN(parseInt(chainId))) { + checkedChainId = chainId + } + rpcList.push({ rpcUrl: url, chainId: checkedChainId, ticker, nickname }) } this.store.updateState({ frequentRpcListDetail: rpcList }) return Promise.resolve(rpcList) |