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