Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sakulstra committed Nov 26, 2024
1 parent be3f986 commit 7414bda
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pre-commit:
commands:
build:
glob: "*.{ts,package-lock.json}"
run: node src/prepare.mjs > src/alchemyIds.ts && git add src/alchemyIds.ts && npm run build && git add dist/*
run: node src/prepare.mjs > src/alchemyIds.ts && git add src/alchemyIds.ts && npm run build && git add .
# yes we're actually committing the build output, because github actions works like that
stage_fixed: true
format:
Expand Down
6 changes: 5 additions & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ import { ChainId, getNetworkEnv, getRPCUrl } from "./lib";
let toml = "";
Object.entries(ChainId).map(([key, chainId]) => {
const networkEnv = getNetworkEnv(chainId);
const rpc = getRPCUrl(chainId, { alchemyKey: process.env.ALCHEMY_API_KEY });
const rpc = getRPCUrl(chainId, {
alchemyKey: process.env.ALCHEMY_API_KEY,
quicknodeToken: process.env.QUICKNODE_TOKEN,
quicknodeEndpointName: process.env.QUICKNODE_ENDPOINT_NAME,
});
env += `${networkEnv}=${rpc || ""}\n`;
toml += `${key}="\${${networkEnv}}"\n`;
});
Expand Down
2 changes: 1 addition & 1 deletion src/lib.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { networkMap } from "./alchemyIds";
import { ChainId, ChainList } from "./chainIds";
import { quicknodeNetworkMap } from "./quicknodeIds";
import { publicRPCs } from "./publicRPCs";
import { quicknodeNetworkMap } from "./quicknodeIds";

type SupportedChainIds = (typeof ChainId)[keyof typeof ChainId];

Expand Down
2 changes: 1 addition & 1 deletion src/prepare.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ const quickNodeApiResponse = {
};

const quicknodeNetworkMap = quickNodeApiResponse.data.reduce((acc, network) => {
network.networks.forEach((nw) => {
network.networks.map((nw) => {
if (nw.chain_id) {
acc[nw.chain_id] = nw.slug;
}
Expand Down

0 comments on commit 7414bda

Please sign in to comment.