Skip to content

Commit 2ca6308

Browse files
committed
dont require to be in chain config
1 parent 8f56b04 commit 2ca6308

File tree

3 files changed

+0
-24
lines changed

3 files changed

+0
-24
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
},
1212
"dependencies": {
1313
"@aws-sdk/client-s3": "^3.740.0",
14-
"@gfxlabs/oku-chains": "^1.1.174",
1514
"fs": "^0.0.1-security",
1615
"fs.promises": "^0.1.2",
1716
"path": "^0.12.7",

src/validate.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
11
import * as fs from "fs/promises";
22
import * as path from "path";
3-
import { MAINNET_CHAINS as chains } from "@gfxlabs/oku-chains";
43
import { Token } from "./types";
54
import { actuallyStrictIsAddress } from "./isAddress";
65

7-
const SUPPORTED_CHAINS: number[] = chains.map(
8-
(chain: { id: number }) => chain.id,
9-
);
10-
11-
function isChainSupported(chainId: number): boolean {
12-
return SUPPORTED_CHAINS.includes(chainId);
13-
}
14-
156
async function validateJsonFiles(baseDirectory: string) {
167
const chainFolders = await fs.readdir(baseDirectory);
178

@@ -21,10 +12,6 @@ async function validateJsonFiles(baseDirectory: string) {
2112
throw new Error(`Chain folder "${chainFolder}" is not a valid integer.`);
2213
}
2314

24-
if (!isChainSupported(Number(chainFolder))) {
25-
throw new Error(`Chain "${chainFolder}" is not supported.`);
26-
}
27-
2815
const chainFolderPath = path.join(baseDirectory, chainFolder);
2916
const chainFolderStats = await fs.stat(chainFolderPath);
3017
if (!chainFolderStats.isDirectory()) {

yarn.lock

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -658,15 +658,6 @@ __metadata:
658658
languageName: node
659659
linkType: hard
660660

661-
"@gfxlabs/oku-chains@npm:^1.1.174":
662-
version: 1.1.174
663-
resolution: "@gfxlabs/oku-chains@npm:1.1.174"
664-
peerDependencies:
665-
viem: 2.x
666-
checksum: 10/93b25578d861a867ff8390cc2f674869c1a763db876c18ddba2b196532b45d02cc049184ad9304164b43523a0df78fe1926c658b8694975d21f42e2379fd5dcd
667-
languageName: node
668-
linkType: hard
669-
670661
"@img/sharp-darwin-arm64@npm:0.33.5":
671662
version: 0.33.5
672663
resolution: "@img/sharp-darwin-arm64@npm:0.33.5"
@@ -1616,7 +1607,6 @@ __metadata:
16161607
resolution: "oku-tokens@workspace:."
16171608
dependencies:
16181609
"@aws-sdk/client-s3": "npm:^3.740.0"
1619-
"@gfxlabs/oku-chains": "npm:^1.1.174"
16201610
"@types/node": "npm:^22.12.0"
16211611
fs: "npm:^0.0.1-security"
16221612
fs.promises: "npm:^0.1.2"

0 commit comments

Comments
 (0)