@requestnetwork/data-access
Advanced tools
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const multi_format_1 = require("@requestnetwork/multi-format"); | ||
const MultiFormat = require("@requestnetwork/multi-format"); | ||
const utils_1 = require("@requestnetwork/utils"); | ||
@@ -65,3 +65,3 @@ /** | ||
// check that all the channel ids are hashes | ||
if (Object.keys(maybeBlock.header.channelIds).some((channelId) => !multi_format_1.default.hashFormat.isDeserializableString(channelId))) { | ||
if (Object.keys(maybeBlock.header.channelIds).some((channelId) => !MultiFormat.hashFormat.isDeserializableString(channelId))) { | ||
throw new Error(`Channel ids in header.channelIds must be formatted keccak256 hashes`); | ||
@@ -76,7 +76,7 @@ } | ||
// check that all the channel ids are hashes | ||
if (Object.keys(maybeBlock.header.topics).some((channelId) => !multi_format_1.default.hashFormat.isDeserializableString(channelId))) { | ||
if (Object.keys(maybeBlock.header.topics).some((channelId) => !MultiFormat.hashFormat.isDeserializableString(channelId))) { | ||
throw new Error(`Channel ids in header.topics must be formatted keccak256 hashes`); | ||
} | ||
// check if topics are hashes | ||
if (Object.values(maybeBlock.header.topics).some((listOfTopics) => listOfTopics.some((topic) => !multi_format_1.default.hashFormat.isDeserializableString(topic)))) { | ||
if (Object.values(maybeBlock.header.topics).some((listOfTopics) => listOfTopics.some((topic) => !MultiFormat.hashFormat.isDeserializableString(topic)))) { | ||
throw new Error(`topics in header.topics must be formatted keccak256 hashes`); | ||
@@ -83,0 +83,0 @@ } |
{ | ||
"name": "@requestnetwork/data-access", | ||
"version": "0.30.1-next.1990+6837eeab", | ||
"version": "0.30.1-next.1991+45d1f5b8", | ||
"publishConfig": { | ||
@@ -42,5 +42,5 @@ "access": "public" | ||
"dependencies": { | ||
"@requestnetwork/multi-format": "0.15.14-next.1990+6837eeab", | ||
"@requestnetwork/types": "0.39.1-next.1990+6837eeab", | ||
"@requestnetwork/utils": "0.39.1-next.1990+6837eeab", | ||
"@requestnetwork/multi-format": "0.15.14-next.1991+45d1f5b8", | ||
"@requestnetwork/types": "0.39.1-next.1991+45d1f5b8", | ||
"@requestnetwork/utils": "0.39.1-next.1991+45d1f5b8", | ||
"tslib": "2.5.0" | ||
@@ -60,3 +60,3 @@ }, | ||
}, | ||
"gitHead": "6837eeab995e2624e65ab5edfa83515234f833e6" | ||
"gitHead": "45d1f5b8a659e4d8dd90d95651d4aec902d4281e" | ||
} |
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
141814
-0.03%