Skip to content

Commit

Permalink
React: Only suppport ArbitrumSepolia during chain upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
tinypell3ts committed Apr 12, 2024
1 parent 3386840 commit 2f6dce1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
5 changes: 1 addition & 4 deletions packages/react/src/helpers/chain.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import { ChainId, Chains } from '@openformat/sdk';

export const chainIdToNetwork = {
[Chains.polygonMumbai.id]: Chains.polygonMumbai,
[Chains.polygon.id]: Chains.polygon,
[Chains.aurora.id]: Chains.aurora,
[Chains.auroraTestnet.id]: Chains.auroraTestnet,
[Chains.foundry.id]: Chains.foundry,
[Chains.arbitrumSepolia.id]: Chains.arbitrumSepolia,
};

export const getNetworkByChainId = (chainId: ChainId) => {
Expand Down
12 changes: 6 additions & 6 deletions packages/react/src/provider.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Chains, OpenFormatSDK } from '@openformat/sdk';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { Aurora, AuroraTestnet, Mumbai, Polygon } from '@thirdweb-dev/chains';
import { ArbitrumSepolia } from '@thirdweb-dev/chains';
import {
Chain,
localWallet,
Expand Down Expand Up @@ -31,9 +31,9 @@ export function OpenFormatProvider({
children,
config = {
// @ts-ignore
networks: [Chains.polygonMumbai],
networks: [Chains.arbitrumSepolia],
appId: '',
activeChain: 'mumbai',
activeChain: 'arbitrum-sepolia',
},
}: {
children: React.ReactNode;
Expand All @@ -42,14 +42,14 @@ export function OpenFormatProvider({
appId: string;
clientId: string;
signer?: Signer | string;
activeChain?: 'mumbai' | 'polygon' | 'aurora' | 'aurora-testnet';
activeChain?: 'arbitrum-sepolia';
};
}) {
return (
<ThirdwebProvider
activeChain={config.activeChain}
clientId={config.clientId}
supportedChains={[Polygon, Aurora, Mumbai, AuroraTestnet]}
supportedChains={[ArbitrumSepolia]}
autoConnect={true}
supportedWallets={[metamaskWallet({ recommended: true }), localWallet()]}
>
Expand All @@ -62,7 +62,7 @@ function InnerProvider({
children,
config = {
// @ts-ignore
networks: [Chains.polygonMumbai],
networks: [Chains.arbitrumSepolia],
appId: '',
},
}: {
Expand Down

0 comments on commit 2f6dce1

Please sign in to comment.