diff --git a/centrifuge-app/src/components/DebugFlags/config.ts b/centrifuge-app/src/components/DebugFlags/config.ts index 1acefe5961..06c8593037 100644 --- a/centrifuge-app/src/components/DebugFlags/config.ts +++ b/centrifuge-app/src/components/DebugFlags/config.ts @@ -36,6 +36,7 @@ export type Key = | 'batchMintNFTs' | 'persistDebugFlags' | 'showBase' + | 'showArbitrum' | 'showUnusedFlags' | 'allowInvestBelowMin' | 'alternativeTheme' @@ -77,6 +78,11 @@ export const flagsConfig: Record = { default: false, alwaysShow: true, }, + showArbitrum: { + type: 'checkbox', + default: false, + alwaysShow: true, + }, showTestNets: { type: 'checkbox', default: isTestEnv, diff --git a/centrifuge-app/src/components/Root.tsx b/centrifuge-app/src/components/Root.tsx index f2af426b1e..acfa861e49 100644 --- a/centrifuge-app/src/components/Root.tsx +++ b/centrifuge-app/src/components/Root.tsx @@ -165,6 +165,7 @@ export function Root() { walletConnectId={import.meta.env.REACT_APP_WALLETCONNECT_ID} showAdvancedAccounts={debugState.showAdvancedAccounts as any} showBase={debugState.showBase as any} + showArbitrum={debugState.showArbitrum as any} showTestNets={debugState.showTestNets as any} > diff --git a/centrifuge-react/src/components/WalletProvider/WalletDialog.tsx b/centrifuge-react/src/components/WalletProvider/WalletDialog.tsx index 2fbd547373..d6075a3603 100644 --- a/centrifuge-react/src/components/WalletProvider/WalletDialog.tsx +++ b/centrifuge-react/src/components/WalletProvider/WalletDialog.tsx @@ -31,6 +31,7 @@ type Props = { evmChains: EvmChains showAdvancedAccounts?: boolean showBase?: boolean + showArbitrum?: boolean showTestNets?: boolean } @@ -40,9 +41,16 @@ const title = { accounts: 'Choose account', } -export function WalletDialog({ evmChains: allEvmChains, showAdvancedAccounts, showBase, showTestNets }: Props) { +export function WalletDialog({ + evmChains: allEvmChains, + showAdvancedAccounts, + showBase, + showArbitrum, + showTestNets, +}: Props) { const evmChains = Object.keys(allEvmChains) .filter((chain) => (!showBase ? !['8453', '84531'].includes(chain) : true)) + .filter((chain) => (!showArbitrum ? !['42161', '421613'].includes(chain) : true)) .filter((chain) => (!showTestNets ? !['5', '84531', '421613', '43113'].includes(chain) : true)) .reduce((obj, key) => { obj[key] = allEvmChains[key] diff --git a/centrifuge-react/src/components/WalletProvider/WalletProvider.tsx b/centrifuge-react/src/components/WalletProvider/WalletProvider.tsx index 36d43ce109..b38a4496ee 100644 --- a/centrifuge-react/src/components/WalletProvider/WalletProvider.tsx +++ b/centrifuge-react/src/components/WalletProvider/WalletProvider.tsx @@ -126,6 +126,7 @@ type WalletProviderProps = { subscanUrl?: string showAdvancedAccounts?: boolean showBase?: boolean + showArbitrum?: boolean showTestNets?: boolean } @@ -144,6 +145,7 @@ export function WalletProvider({ subscanUrl, showAdvancedAccounts, showBase, + showArbitrum, showTestNets, }: WalletProviderProps) { if (!evmChainsProp[1]?.urls[0]) throw new Error('Mainnet should be defined in EVM Chains') @@ -488,6 +490,7 @@ export function WalletProvider({ evmChains={evmChains} showAdvancedAccounts={showAdvancedAccounts} showBase={showBase} + showArbitrum={showArbitrum} showTestNets={showTestNets} />