Skip to content

Commit

Permalink
Merge pull request #10 from argentlabs/develop
Browse files Browse the repository at this point in the history
fix: rpc provider
  • Loading branch information
bluecco authored Jun 6, 2024
2 parents 9aa42cd + 9cb8f63 commit 56e7ab8
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,24 @@ export const ETHTokenAddress =
export const DAITokenAddress =
"0x00da114221cb83fa859dbdb4c44beeaa0bb37c7537ad5ae66fe5e0efd20e6eb3"

export const CHAIN_ID =
process.env.NEXT_PUBLIC_CHAIN_ID === constants.NetworkName.SN_MAIN
? constants.NetworkName.SN_MAIN
: constants.NetworkName.SN_SEPOLIA

const NODE_URL =
process.env.NEXT_PUBLIC_CHAIN_ID === constants.NetworkName.SN_MAIN
? "https://starknet-mainnet.public.blastapi.io"
: "https://starknet-sepolia.public.blastapi.io/rpc/v0_7"

const STARKNET_CHAIN_ID =
process.env.NEXT_PUBLIC_CHAIN_ID === constants.NetworkName.SN_MAIN
? constants.StarknetChainId.SN_MAIN
: constants.StarknetChainId.SN_SEPOLIA

export const provider = new RpcProvider({
nodeUrl: "https://starknet-sepolia.public.blastapi.io/rpc/v0_7",
chainId: constants.StarknetChainId.SN_SEPOLIA,
nodeUrl: NODE_URL,
chainId: STARKNET_CHAIN_ID,
})

export const ARGENT_SESSION_SERVICE_BASE_URL =
Expand All @@ -17,8 +32,3 @@ export const ARGENT_SESSION_SERVICE_BASE_URL =

export const ARGENT_WEBWALLET_URL =
process.env.NEXT_PUBLIC_ARGENT_WEBWALLET_URL || "https://web.argent.xyz"

export const CHAIN_ID =
process.env.NEXT_PUBLIC_CHAIN_ID === constants.NetworkName.SN_MAIN
? constants.NetworkName.SN_MAIN
: constants.NetworkName.SN_SEPOLIA

0 comments on commit 56e7ab8

Please sign in to comment.