diff --git a/dht-node/src/dht_node/index.ts b/dht-node/src/dht_node/index.ts index ab81792df..2fd6cd1e7 100644 --- a/dht-node/src/dht_node/index.ts +++ b/dht-node/src/dht_node/index.ts @@ -189,11 +189,9 @@ export const startDHT = async (topic: string): Promise => { } async function writeHomeCommunityEnries(pubKey: any): Promise { - const homeApiVersions: CommunityApi[] = Object.values(ApiVersionType).map(function ( - apiEnum, - idx, - ) { - const port = Number.parseInt(CONFIG.FEDERATION_COMMUNITY_API_PORT) + idx + 1 + const homeApiVersions: CommunityApi[] = Object.values(ApiVersionType).map(function (apiEnum) { + const port = + Number.parseInt(CONFIG.FEDERATION_COMMUNITY_API_PORT) + Number(apiEnum.replace('_', '')) const comApi: CommunityApi = { api: apiEnum, url: CONFIG.FEDERATION_COMMUNITY_URL + ':' + port.toString() + '/api/',