Skip to content

Commit

Permalink
removed the sslOnly restriction for load peer nodes method on harvest…
Browse files Browse the repository at this point in the history
…ing page
  • Loading branch information
Baha committed Nov 22, 2021
1 parent cffdf37 commit eb953a9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/services/NodeService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<NodeModel[]> {
public async getNodesFromStatisticService(
networkType: NetworkType,
limit = 30,
sslOnly = true,
isOffline?: boolean,
): Promise<NodeModel[]> {
const nodeSearchCriteria = {
nodeFilter: NodeListFilter.Suggested,
limit,
ssl: true,
...(sslOnly ? { ssl: sslOnly } : {}),
};
if (!isOffline && navigator.onLine) {
try {
Expand Down
2 changes: 1 addition & 1 deletion src/store/Network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit eb953a9

Please sign in to comment.