Minor updates #1
12
dist/index.js
vendored
12
dist/index.js
vendored
@ -2352,8 +2352,8 @@ function getSubdomains() {
|
||||
}
|
||||
function getRelayerEnsSubdomains() {
|
||||
const allConfig = getNetworkConfig();
|
||||
return Object.keys(allConfig).reduce((acc, chain) => {
|
||||
acc[Number(chain)] = allConfig[Number(chain)].relayerEnsSubdomain;
|
||||
return enabledChains.reduce((acc, chain) => {
|
||||
acc[chain] = allConfig[chain].relayerEnsSubdomain;
|
||||
return acc;
|
||||
}, {});
|
||||
}
|
||||
@ -3377,12 +3377,12 @@ class BaseRegistryService extends BaseEventsService {
|
||||
]);
|
||||
const relayers = relayersData.map(({ owner, balance: stakeBalance, records, isRegistered }, index) => {
|
||||
const { ensName, relayerAddress } = uniqueRegisters[index];
|
||||
const hostnames = {};
|
||||
records.forEach((record, recordIndex) => {
|
||||
const hostnames = records.reduce((acc, record, recordIndex) => {
|
||||
if (record) {
|
||||
hostnames[Number(Object.keys(this.relayerEnsSubdomains)[recordIndex])] = record;
|
||||
acc[Number(Object.keys(this.relayerEnsSubdomains)[recordIndex])] = record;
|
||||
}
|
||||
});
|
||||
return acc;
|
||||
}, {});
|
||||
const isOwner = !relayerAddress || relayerAddress === owner;
|
||||
const hasMinBalance = stakeBalance >= MIN_STAKE_BALANCE;
|
||||
const preCondition = Object.keys(hostnames).length && isOwner && isRegistered && hasMinBalance;
|
||||
|
12
dist/index.mjs
vendored
12
dist/index.mjs
vendored
@ -2331,8 +2331,8 @@ function getSubdomains() {
|
||||
}
|
||||
function getRelayerEnsSubdomains() {
|
||||
const allConfig = getNetworkConfig();
|
||||
return Object.keys(allConfig).reduce((acc, chain) => {
|
||||
acc[Number(chain)] = allConfig[Number(chain)].relayerEnsSubdomain;
|
||||
return enabledChains.reduce((acc, chain) => {
|
||||
acc[chain] = allConfig[chain].relayerEnsSubdomain;
|
||||
return acc;
|
||||
}, {});
|
||||
}
|
||||
@ -3356,12 +3356,12 @@ class BaseRegistryService extends BaseEventsService {
|
||||
]);
|
||||
const relayers = relayersData.map(({ owner, balance: stakeBalance, records, isRegistered }, index) => {
|
||||
const { ensName, relayerAddress } = uniqueRegisters[index];
|
||||
const hostnames = {};
|
||||
records.forEach((record, recordIndex) => {
|
||||
const hostnames = records.reduce((acc, record, recordIndex) => {
|
||||
if (record) {
|
||||
hostnames[Number(Object.keys(this.relayerEnsSubdomains)[recordIndex])] = record;
|
||||
acc[Number(Object.keys(this.relayerEnsSubdomains)[recordIndex])] = record;
|
||||
}
|
||||
});
|
||||
return acc;
|
||||
}, {});
|
||||
const isOwner = !relayerAddress || relayerAddress === owner;
|
||||
const hasMinBalance = stakeBalance >= MIN_STAKE_BALANCE;
|
||||
const preCondition = Object.keys(hostnames).length && isOwner && isRegistered && hasMinBalance;
|
||||
|
12
dist/index.umd.js
vendored
12
dist/index.umd.js
vendored
@ -59725,12 +59725,12 @@ class BaseRegistryService extends BaseEventsService {
|
||||
]);
|
||||
const relayers = relayersData.map(({ owner, balance: stakeBalance, records, isRegistered }, index) => {
|
||||
const { ensName, relayerAddress } = uniqueRegisters[index];
|
||||
const hostnames = {};
|
||||
records.forEach((record, recordIndex) => {
|
||||
const hostnames = records.reduce((acc, record, recordIndex) => {
|
||||
if (record) {
|
||||
hostnames[Number(Object.keys(this.relayerEnsSubdomains)[recordIndex])] = record;
|
||||
acc[Number(Object.keys(this.relayerEnsSubdomains)[recordIndex])] = record;
|
||||
}
|
||||
});
|
||||
return acc;
|
||||
}, {});
|
||||
const isOwner = !relayerAddress || relayerAddress === owner;
|
||||
const hasMinBalance = stakeBalance >= _relayerClient__WEBPACK_IMPORTED_MODULE_2__/* .MIN_STAKE_BALANCE */ .pO;
|
||||
const preCondition = Object.keys(hostnames).length && isOwner && isRegistered && hasMinBalance;
|
||||
@ -61882,8 +61882,8 @@ function getSubdomains() {
|
||||
}
|
||||
function getRelayerEnsSubdomains() {
|
||||
const allConfig = getNetworkConfig();
|
||||
return Object.keys(allConfig).reduce((acc, chain) => {
|
||||
acc[Number(chain)] = allConfig[Number(chain)].relayerEnsSubdomain;
|
||||
return enabledChains.reduce((acc, chain) => {
|
||||
acc[chain] = allConfig[chain].relayerEnsSubdomain;
|
||||
return acc;
|
||||
}, {});
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tornado/core",
|
||||
"version": "1.0.7",
|
||||
"version": "1.0.8",
|
||||
"description": "An SDK for building applications on top of Privacy Pools",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
|
@ -899,13 +899,12 @@ export class BaseRegistryService extends BaseEventsService<RegistersEvents> {
|
||||
.map(({ owner, balance: stakeBalance, records, isRegistered }, index) => {
|
||||
const { ensName, relayerAddress } = uniqueRegisters[index];
|
||||
|
||||
const hostnames = {} as SubdomainMap;
|
||||
|
||||
records.forEach((record, recordIndex) => {
|
||||
const hostnames = records.reduce((acc, record, recordIndex) => {
|
||||
if (record) {
|
||||
hostnames[Number(Object.keys(this.relayerEnsSubdomains)[recordIndex])] = record;
|
||||
acc[Number(Object.keys(this.relayerEnsSubdomains)[recordIndex])] = record;
|
||||
}
|
||||
});
|
||||
return acc;
|
||||
}, {} as SubdomainMap);
|
||||
|
||||
const isOwner = !relayerAddress || relayerAddress === owner;
|
||||
const hasMinBalance = stakeBalance >= MIN_STAKE_BALANCE;
|
||||
|
@ -746,8 +746,8 @@ export function getSubdomains() {
|
||||
export function getRelayerEnsSubdomains() {
|
||||
const allConfig = getNetworkConfig();
|
||||
|
||||
return Object.keys(allConfig).reduce((acc, chain) => {
|
||||
acc[Number(chain)] = allConfig[Number(chain)].relayerEnsSubdomain;
|
||||
return enabledChains.reduce((acc, chain) => {
|
||||
acc[chain] = allConfig[chain].relayerEnsSubdomain;
|
||||
return acc;
|
||||
}, {} as SubdomainMap);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user