From bc95e1f2ccd91e6eb7f26a1461bc9be5290a8bac Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Fri, 23 Feb 2024 17:06:24 +1100 Subject: [PATCH] fix: log that onsresolve won't work when on testnet --- ts/session/apis/snode_api/onsResolve.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ts/session/apis/snode_api/onsResolve.ts b/ts/session/apis/snode_api/onsResolve.ts index 767b75968..a0a27d0a1 100644 --- a/ts/session/apis/snode_api/onsResolve.ts +++ b/ts/session/apis/snode_api/onsResolve.ts @@ -1,4 +1,5 @@ import _, { range } from 'lodash'; +import { isTestNet } from '../../../shared/env_vars'; import { getSodiumRenderer } from '../../crypto'; import { fromHexToArray, @@ -35,6 +36,10 @@ async function getSessionIDForOnsName(onsNameCase: string) { const nameHash = sodium.crypto_generichash(sodium.crypto_generichash_BYTES, nameAsData); const base64EncodedNameHash = fromUInt8ArrayToBase64(nameHash); + if (isTestNet()) { + window.log.info('OnsResolve response are not registered to anything on testnet'); + } + const onsResolveRequests = buildOnsResolveRequests(base64EncodedNameHash); // we do this request with validationCount snodes