From eb953a95938492603f60c2843e9c299bbdfc42f9 Mon Sep 17 00:00:00 2001 From: Baha Date: Mon, 22 Nov 2021 23:11:05 +0000 Subject: [PATCH] removed the sslOnly restriction for load peer nodes method on harvesting page --- src/services/NodeService.ts | 9 +++++++-- src/store/Network.ts | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) 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