diff --git a/packages/keychain/.env.development b/packages/keychain/.env.development index 2c340ed62..970a36e74 100644 --- a/packages/keychain/.env.development +++ b/packages/keychain/.env.development @@ -4,3 +4,5 @@ NEXT_PUBLIC_ADMIN_URL="http://localhost:3002" NEXT_PUBLIC_API_URL="http://localhost:8000" # NEXT_PUBLIC_ETH_RPC_MAINNET="https://eth-mainnet.g.alchemy.com/v2/OGPRMquXP3K7oTkLrmVZpjCd1DswtYz3" # NEXT_PUBLIC_ETH_RPC_SEPOLIA="https://eth-sepolia.g.alchemy.com/v2/mURnclB5pn5elDfyzgTN4W2GR-rOYevI" +# NEXT_PUBLIC_RPC_MAINNET="http://localhost:8001/x/starknet/mainnet" +NEXT_PUBLIC_RPC_SEPOLIA="http://localhost:8001/x/starknet/sepolia" diff --git a/packages/keychain/.env.production b/packages/keychain/.env.production index c50b04675..734d2a8ec 100644 --- a/packages/keychain/.env.production +++ b/packages/keychain/.env.production @@ -4,3 +4,5 @@ NEXT_PUBLIC_ADMIN_URL="https://cartridge.gg" NEXT_PUBLIC_API_URL="https://api.cartridge.gg" # NEXT_PUBLIC_ETH_RPC_MAINNET="https://eth-mainnet.g.alchemy.com/v2/OGPRMquXP3K7oTkLrmVZpjCd1DswtYz3" # NEXT_PUBLIC_ETH_RPC_SEPOLIA="https://eth-sepolia.g.alchemy.com/v2/mURnclB5pn5elDfyzgTN4W2GR-rOYevI" +# NEXT_PUBLIC_RPC_MAINNET="https://api.cartridge.gg/x/starknet/mainnet" +NEXT_PUBLIC_RPC_SEPOLIA="https://api.cartridge.gg/x/starknet/sepolia" diff --git a/packages/keychain/src/hooks/connection.tsx b/packages/keychain/src/hooks/connection.tsx index 171b8e733..eb83c1443 100644 --- a/packages/keychain/src/hooks/connection.tsx +++ b/packages/keychain/src/hooks/connection.tsx @@ -97,7 +97,7 @@ export function ConnectionProvider({ children }: PropsWithChildren) { // Set rpc and origin if we're not embedded (eg Slot auth/session) if (!isIframe()) { setOrigin(urlParams.get("origin") || process.env.NEXT_PUBLIC_ORIGIN); - setRpcUrl(urlParams.get("rpc_url")); + setRpcUrl(urlParams.get("rpc_url") || process.env.NEXT_PUBLIC_RPC_SEPOLIA); } const prefundParam = urlParams.get("prefunds");