From 031e1224dd9ebeea557611bf8a8b8a694435e2ce Mon Sep 17 00:00:00 2001 From: dekanbro Date: Tue, 25 Jul 2023 08:32:59 -0600 Subject: [PATCH] use alchemy override --- src/hooks/useSafeETH.tsx | 2 +- src/pages/Join.tsx | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/hooks/useSafeETH.tsx b/src/hooks/useSafeETH.tsx index 5f9a365..610dec7 100644 --- a/src/hooks/useSafeETH.tsx +++ b/src/hooks/useSafeETH.tsx @@ -15,7 +15,7 @@ type FetchShape = { const fetchBalanceData = async ({ chainId, - rpcs = HAUS_RPC, + rpcs = HAUS_RPC, fetchShape, }: { chainId: ValidNetwork; diff --git a/src/pages/Join.tsx b/src/pages/Join.tsx index 4c853de..ca8bc44 100644 --- a/src/pages/Join.tsx +++ b/src/pages/Join.tsx @@ -37,6 +37,8 @@ import { useERC20 } from "../hooks/useERC20"; import { ProgressSection } from "../components/ProgressSection"; import { useSafeETH } from "../hooks/useSafeETH"; import { MemberTable } from "../components/MemberTable/MemberTable"; +import { HAUS_RPC } from "@daohaus/keychain-utils"; + const StakeBox = styled.div` max-width: 70rem; @@ -79,6 +81,8 @@ const SpinnerBox = styled.div` justify-content: center; width: 100%; `; + +const HAUS_RPC_OV = {...HAUS_RPC,...{"0xa":`https://opt-mainnet.g.alchemy.com/v2/${import.meta.env.VITE_ALCHEMY_KEY}`}} export const Join = () => { const { address, provider, chainId } = useDHConnect(); const { fireTransaction } = useTxBuilder(); @@ -92,6 +96,7 @@ export const Join = () => { chainId: TARGETS.CHAIN_ID, userAddress: address, provider: provider, + rpcs: HAUS_RPC_OV, fetchShape: { balanceOf: true, }, @@ -106,6 +111,7 @@ export const Join = () => { chainId: TARGETS.CHAIN_ID, userAddress: address, tokenAddress: TARGETS.LOOT_ADDRESS, + rpcs: HAUS_RPC_OV, fetchShape: { balanceOf: true, }, @@ -114,6 +120,7 @@ export const Join = () => { const { shamanData, isLoading: isShamanLoading } = useOnboarder({ shamanAddress: TARGETS.SHAMAN_ADDRESS, chainId: TARGETS.CHAIN_ID, + rpcs: HAUS_RPC_OV, fetchShape: { expiry: true, minTribute: true, @@ -129,6 +136,7 @@ export const Join = () => { refetch: refetchYeetBank, } = useSafeETH({ chainId: TARGETS.CHAIN_ID, + rpcs: HAUS_RPC_OV, fetchShape: { balanceOf: true, },