diff --git a/src/services/NodeService.ts b/src/services/NodeService.ts index 56eea2d56..db8193e03 100644 --- a/src/services/NodeService.ts +++ b/src/services/NodeService.ts @@ -70,11 +70,16 @@ export class NodeService { .then((val) => (statisticsNodes && statisticsNodes.length ? _.uniqBy(val.concat([...statisticsNodes]), 'url') : val)); } - public async getNodesFromStatisticService(networkType: NetworkType, limit = 30, isOffline?: boolean): Promise { + public async getNodesFromStatisticService( + networkType: NetworkType, + limit = 30, + sslOnly = true, + isOffline?: boolean, + ): Promise { const nodeSearchCriteria = { nodeFilter: NodeListFilter.Suggested, limit, - ssl: true, + ...(sslOnly ? { ssl: sslOnly } : {}), }; if (!isOffline && navigator.onLine) { try { diff --git a/src/store/Network.ts b/src/store/Network.ts index b5be13999..1617010f9 100644 --- a/src/store/Network.ts +++ b/src/store/Network.ts @@ -571,7 +571,7 @@ export default { const nodeService = new NodeService(); const networkType = getters['networkType']; const isOffline = getters['isOfflineMode']; - commit('peerNodes', _.uniqBy(await nodeService.getNodesFromStatisticService(networkType, 100, isOffline), 'url')); + commit('peerNodes', _.uniqBy(await nodeService.getNodesFromStatisticService(networkType, 100, false, isOffline), 'url')); }, // set current difference between server and local time