Skip to content

Commit

Permalink
update rpc
Browse files Browse the repository at this point in the history
  • Loading branch information
hkey0 authored Oct 8, 2024
1 parent 06ea85b commit e9a54b6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/components/Deposit/DepositContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,12 @@ export const DepositContent: React.FC<DepositContentProps> = ({ modalStuff, amou
if (!wallet) return;
// ignore this for sepolia
if (( !provider && process.env.NEXT_PUBLIC_CURRENT_CHAIN === "mainnet")|| !(wallet.chain == "EVM")) return;
const balance = await getBalance(client, {
const balClient = createPublicClient({
chain: (process.env.NEXT_PUBLIC_CURRENT_CHAIN === "mainnet") ? mainnet : sepolia,
transport: (process.env.NEXT_PUBLIC_CURRENT_CHAIN === "mainnet") ? http() : http("https://sepolia.drpc.org"),
cacheTime: 0
})
const balance = await getBalance(balClient, {
//@ts-ignore
address: wallet.address,
blockTag: 'safe'
Expand Down

0 comments on commit e9a54b6

Please sign in to comment.