Skip to content

Commit

Permalink
feat: for now this should work under all scenarios without any requir…
Browse files Browse the repository at this point in the history
…ed changes
  • Loading branch information
carlosgj94 committed Apr 19, 2024
1 parent b326883 commit 4c896da
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 3 additions & 3 deletions context/Web3Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ const metadata = {
};

export const config = createConfig({
chains: [PUB_CHAIN],
// ssr: true,
chains: [PUB_CHAIN, mainnet],
ssr: true,
transports: {
[PUB_CHAIN.id]: http(PUB_WEB3_ENDPOINT, { batch: true }),
// [mainnet.id]: http(PUB_WEB3_ENDPOINT, { batch: true }),
[mainnet.id]: http(PUB_WEB3_ENDPOINT, { batch: true }),
},
connectors: [
walletConnect({
Expand Down
8 changes: 8 additions & 0 deletions hooks/useSkipFirstRender.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { useEffect, useState } from "react";

export function useSkipFirstRender() {
const [skipRender, setSkipRender] = useState(true);

useEffect(() => setSkipRender(false), []);
return skipRender;
}

0 comments on commit 4c896da

Please sign in to comment.