Skip to content

Commit

Permalink
Merge pull request #10 from HausDAO/feat/rpcOverride
Browse files Browse the repository at this point in the history
use alchemy override
  • Loading branch information
dekanbro authored Jul 25, 2023
2 parents 5fb755a + 031e122 commit 5fe01b1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/useSafeETH.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type FetchShape = {

const fetchBalanceData = async ({
chainId,
rpcs = HAUS_RPC,
rpcs = HAUS_RPC,
fetchShape,
}: {
chainId: ValidNetwork;
Expand Down
8 changes: 8 additions & 0 deletions src/pages/Join.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand All @@ -92,6 +96,7 @@ export const Join = () => {
chainId: TARGETS.CHAIN_ID,
userAddress: address,
provider: provider,
rpcs: HAUS_RPC_OV,
fetchShape: {
balanceOf: true,
},
Expand All @@ -106,6 +111,7 @@ export const Join = () => {
chainId: TARGETS.CHAIN_ID,
userAddress: address,
tokenAddress: TARGETS.LOOT_ADDRESS,
rpcs: HAUS_RPC_OV,
fetchShape: {
balanceOf: true,
},
Expand All @@ -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,
Expand All @@ -129,6 +136,7 @@ export const Join = () => {
refetch: refetchYeetBank,
} = useSafeETH({
chainId: TARGETS.CHAIN_ID,
rpcs: HAUS_RPC_OV,
fetchShape: {
balanceOf: true,
},
Expand Down

0 comments on commit 5fe01b1

Please sign in to comment.