Skip to content

Commit

Permalink
processing protocol in node domains when missing
Browse files Browse the repository at this point in the history
  • Loading branch information
moliva committed Feb 6, 2020
1 parent 5375c3a commit e291751
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion commons/src/DAOClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,17 @@ export class DAOClient {
for (let i = 0; i < count; i++) {
try {
const katalystId = await this.contract.methods.catalystIds(i).call();
const { id, owner, domain } = await this.contract.methods.catalystById(katalystId).call();
let { id, owner, domain } = await this.contract.methods.catalystById(katalystId).call();

if (domain.startsWith("http://")) {
console.warn(`Catalyst node domain using http protocol, skipping ${domain}`);
continue;
}

if (!domain.startsWith("https://")) {
domain = "https://" + domain;
}

result.add({ address: domain, owner: owner.toJSON(), id });
} catch (error) {}
}
Expand Down

0 comments on commit e291751

Please sign in to comment.