Skip to content

Commit

Permalink
Arbitrum as default chain
Browse files Browse the repository at this point in the history
  • Loading branch information
brucedonovan authored and Jacob Bryant committed Mar 14, 2023
1 parent 73200e1 commit 6d68a1c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "app-v2",
"version": "2.5.9",
"version": "2.5.10",
"private": true,
"dependencies": {
"@ethersproject/providers": "^5.6.8",
Expand Down
5 changes: 3 additions & 2 deletions src/contexts/ChainContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ const ChainProvider = ({ children }: { children: ReactNode }) => {
} = useContext(SettingsContext);

/* HOOKS */
// const provider = useDefaulProvider();
const provider = useProvider();
const provider = useProvider({
chainId: 42161,
});
const chainId = useChainId();
const contracts = useContracts();

Expand Down
2 changes: 1 addition & 1 deletion src/contexts/ProviderContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const ProviderContext = ({ children }: { children: ReactNode }) => {
? // Production environment >
[
alchemyProvider({
apiKey: process.env.ALCHEMY_MAINNET_KEY!,
apiKey: process.env.ALCHEMY_ARBITRUM_KEY!,
}),
]
: // Test/Dev environents (eg. tenderly) >
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useChainId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useNetwork } from 'wagmi';
* @returns chain id to use when fetching data
*/
const useChainId = () => {
const DEFAULT_CHAIN_ID = 1;
const DEFAULT_CHAIN_ID = 42161;
const { chain } = useNetwork();
return chain ? chain.id : DEFAULT_CHAIN_ID;
};
Expand Down

0 comments on commit 6d68a1c

Please sign in to comment.