Skip to content

Commit

Permalink
chore: lint+fix
Browse files Browse the repository at this point in the history
  • Loading branch information
khanti42 committed Dec 5, 2024
1 parent 3cf49a8 commit 86aed8c
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions packages/starknet-snap/src/utils/din.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import { constants } from "starknet";
import { constants } from 'starknet';

/**
*
* @param chainId
*/
export function getRPCUrl(chainId: string) {
switch (chainId) {
case constants.StarknetChainId.SN_MAIN:
return `https://starknet-mainnet.infura.io/v3/${getRPCCredentials()}`;
default:
case constants.StarknetChainId.SN_SEPOLIA:
return `https://starknet-sepolia.infura.io/v3/${getRPCCredentials()}`;
}
switch (chainId) {
case constants.StarknetChainId.SN_MAIN:
return `https://starknet-mainnet.infura.io/v3/${getRPCCredentials()}`;
default:
case constants.StarknetChainId.SN_SEPOLIA:
return `https://starknet-sepolia.infura.io/v3/${getRPCCredentials()}`;
}

/**
*
*/
export function getRPCCredentials(): string {
// eslint-disable-next-line no-restricted-globals
return process.env.DIN_API_KEY ?? '';
}
}

/**
*
*/
export function getRPCCredentials(): string {
// eslint-disable-next-line no-restricted-globals
return process.env.DIN_API_KEY ?? '';
}

0 comments on commit 86aed8c

Please sign in to comment.