Skip to content

Commit

Permalink
Default rpc url value (#336)
Browse files Browse the repository at this point in the history
  • Loading branch information
broody authored Jun 5, 2024
1 parent ae91945 commit 66c07b0
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions packages/keychain/src/hooks/connection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,7 @@ export function ConnectionProvider({ children }: PropsWithChildren) {
useEffect(() => {
if (!isIframe()) {
const urlParams = new URLSearchParams(window.location.search);
const url = urlParams.get("rpc_url");

if (!url) {
setError(new Error("rpc_url is not provided in the query parameters"));
return;
}

setRpcUrl(url);
setRpcUrl(urlParams.get("rpc_url") || process.env.NEXT_PUBLIC_RPC_SEPOLIA);
return;
}

Expand Down

0 comments on commit 66c07b0

Please sign in to comment.