|
|
@ -1,4 +1,5 @@
|
|
|
|
import _, { range } from 'lodash';
|
|
|
|
import _, { range } from 'lodash';
|
|
|
|
|
|
|
|
import { isTestNet } from '../../../shared/env_vars';
|
|
|
|
import { getSodiumRenderer } from '../../crypto';
|
|
|
|
import { getSodiumRenderer } from '../../crypto';
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
fromHexToArray,
|
|
|
|
fromHexToArray,
|
|
|
@ -35,6 +36,10 @@ async function getSessionIDForOnsName(onsNameCase: string) {
|
|
|
|
const nameHash = sodium.crypto_generichash(sodium.crypto_generichash_BYTES, nameAsData);
|
|
|
|
const nameHash = sodium.crypto_generichash(sodium.crypto_generichash_BYTES, nameAsData);
|
|
|
|
const base64EncodedNameHash = fromUInt8ArrayToBase64(nameHash);
|
|
|
|
const base64EncodedNameHash = fromUInt8ArrayToBase64(nameHash);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (isTestNet()) {
|
|
|
|
|
|
|
|
window.log.info('OnsResolve response are not registered to anything on testnet');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const onsResolveRequests = buildOnsResolveRequests(base64EncodedNameHash);
|
|
|
|
const onsResolveRequests = buildOnsResolveRequests(base64EncodedNameHash);
|
|
|
|
|
|
|
|
|
|
|
|
// we do this request with validationCount snodes
|
|
|
|
// we do this request with validationCount snodes
|
|
|
|