diff --git a/frontend/components/Layout/TopBar.tsx b/frontend/components/Layout/TopBar.tsx index d552d243e..9428fc7f8 100644 --- a/frontend/components/Layout/TopBar.tsx +++ b/frontend/components/Layout/TopBar.tsx @@ -62,9 +62,7 @@ export const TopBar = () => { - - {`Pearl (Optimus) (alpha) ${envName ? `(${envName})` : ''}`.trim()} - + {`Pearl (alpha) ${envName ? `(${envName})` : ''}`.trim()} ); }; diff --git a/frontend/components/ManageStakingPage/StakingContractSection/index.tsx b/frontend/components/ManageStakingPage/StakingContractSection/index.tsx index b23ffea35..51206d27f 100644 --- a/frontend/components/ManageStakingPage/StakingContractSection/index.tsx +++ b/frontend/components/ManageStakingPage/StakingContractSection/index.tsx @@ -1,13 +1,14 @@ import { Flex, Tag, theme, Typography } from 'antd'; import { useMemo } from 'react'; -import { MiddlewareChain } from '@/client'; import { CardSection } from '@/components/styled/CardSection'; import { UNICODE_SYMBOLS } from '@/constants/symbols'; import { EXPLORER_URL } from '@/constants/urls'; import { StakingProgramId } from '@/enums/StakingProgram'; import { StakingProgramStatus } from '@/enums/StakingProgramStatus'; +import { useServices } from '@/hooks/useServices'; import { useStakingProgram } from '@/hooks/useStakingProgram'; +import { Maybe } from '@/types/Util'; import { CantMigrateAlert } from './CantMigrateAlert'; import { MigrateButton } from './MigrateButton'; @@ -41,6 +42,7 @@ export const StakingContractSection = ({ activeStakingProgramMeta, activeStakingProgramAddress, } = useStakingProgram(); + const { selectedService } = useServices(); // /** // * Returns `true` if this stakingProgram is active, @@ -84,6 +86,9 @@ export const StakingContractSection = ({ ); }, [migrateValidation]); + const chainId: Maybe = + selectedService?.home_chain_id; + return ( <> - - View contract details {UNICODE_SYMBOLS.EXTERNAL_LINK} - + + {chainId && ( + + View contract details {UNICODE_SYMBOLS.EXTERNAL_LINK} + + )} {!migrateValidation.canMigrate && ( { const [form] = Form.useForm(); const handleFinish = (values: { 'backup-signer': string }) => { + // important to lowercase the address before check summing, invalid checksums will cause ethers to throw + // returns null if invalid, ethers type is incorrect... const checksummedAddress = getAddress( - // important to lowercase the address before checksumming, invalid checksums will cause ethers to throw values['backup-signer'].toLowerCase(), - ) as Address | null; // returns null if invalid, ethers type is incorrect... + ) as Address | null; // If the address is invalid, show an error message if (!checksummedAddress) { diff --git a/frontend/components/SetupPage/Create/SetupCreateSafe.tsx b/frontend/components/SetupPage/Create/SetupCreateSafe.tsx index 2e16c158f..d063157d5 100644 --- a/frontend/components/SetupPage/Create/SetupCreateSafe.tsx +++ b/frontend/components/SetupPage/Create/SetupCreateSafe.tsx @@ -7,7 +7,6 @@ import { CardSection } from '@/components/styled/CardSection'; import { UNICODE_SYMBOLS } from '@/constants/symbols'; import { SUPPORT_URL } from '@/constants/urls'; import { Pages } from '@/enums/Pages'; -import { useMultisig } from '@/hooks/useMultisig'; import { usePageState } from '@/hooks/usePageState'; import { useSetup } from '@/hooks/useSetup'; import { useMasterWalletContext } from '@/hooks/useWallet'; @@ -22,25 +21,60 @@ const capitalizedMiddlewareChainNames = { [+MiddlewareChain.OPTIMISM]: 'Optimism', }; +const YouWillBeRedirected = ({ text }: { text: string }) => ( + <> + logo + + {text} + + + You will be redirected once the account is created. + + +); + +const CreationError = () => ( + <> + logo + + Error, please restart the app and try again. + + + If the issue persists,{' '} + + contact Olas community support {UNICODE_SYMBOLS.EXTERNAL_LINK} + + . + + +); + export const SetupCreateSafe = () => { const { goto } = usePageState(); - const { - updateWallets, - masterSafeAddressKeyExistsForChain, - masterSafeAddress, - } = useMasterWalletContext(); - const { updateMasterSafeOwners } = useMultisig(); + const { masterSafes, refetch: updateWallets } = useMasterWalletContext(); + // const { updateMasterSafeOwners } = useMultisig(); const { backupSigner } = useSetup(); + const masterSafeAddress = useMemo(() => { + if (!masterSafes) return; + return masterSafes[0]?.address; + }, [masterSafes]); + const [isCreatingSafe, setIsCreatingSafe] = useState(false); - const [optimismFailed, setOptimismFailed] = useState(false); - const [ethereumFailed, setEthereumFailed] = useState(false); - const [baseFailed, setBaseFailed] = useState(false); + const [gnosisFailed, setGnosisFailed] = useState(false); + // const [optimismFailed, setOptimismFailed] = useState(false); + // const [ethereumFailed, setEthereumFailed] = useState(false); + // const [baseFailed, setBaseFailed] = useState(false); - const [isOptimismSuccess, setIsOptimismSuccess] = useState(false); - const [isEthereumSuccess, setIsEthereumSuccess] = useState(false); - const [isBaseSuccess, setIsBaseSuccess] = useState(false); + const [isGnosisSuccess, setIsGnosisSuccess] = useState(false); + // const [isOptimismSuccess, setIsOptimismSuccess] = useState(false); + // const [isEthereumSuccess, setIsEthereumSuccess] = useState(false); + // const [isBaseSuccess, setIsBaseSuccess] = useState(false); const createSafeWithRetries = useCallback( async (middlewareChain: MiddlewareChain, retries: number) => { @@ -48,21 +82,28 @@ export const SetupCreateSafe = () => { // If we have retried too many times, set failed if (retries <= 0) { - if (middlewareChain === MiddlewareChain.OPTIMISM) { - setOptimismFailed(true); - setIsOptimismSuccess(false); - throw new Error('Failed to create safe on Ethereum'); - } - if (middlewareChain === MiddlewareChain.ETHEREUM) { - setEthereumFailed(true); - setIsEthereumSuccess(false); - throw new Error('Failed to create safe on Ethereum'); - } - if (middlewareChain === MiddlewareChain.BASE) { - setBaseFailed(true); - setIsBaseSuccess(false); + // if (middlewareChain === MiddlewareChain.OPTIMISM) { + // setOptimismFailed(true); + // setIsOptimismSuccess(false); + // throw new Error('Failed to create safe on Ethereum'); + // } + // if (middlewareChain === MiddlewareChain.ETHEREUM) { + // setEthereumFailed(true); + // setIsEthereumSuccess(false); + // throw new Error('Failed to create safe on Ethereum'); + // } + // if (middlewareChain === MiddlewareChain.BASE) { + // setBaseFailed(true); + // setIsBaseSuccess(false); + // throw new Error('Failed to create safe on Base'); + // } + + if (middlewareChain === MiddlewareChain.GNOSIS) { + setGnosisFailed(true); + setIsGnosisSuccess(false); throw new Error('Failed to create safe on Base'); } + throw new Error('Failed to create safe as chain is not supported'); } @@ -71,20 +112,23 @@ export const SetupCreateSafe = () => { .then(async () => { // Attempt wallet and master safe updates before proceeding try { - await updateWallets(); - await updateMasterSafeOwners(); + await updateWallets?.(); + // await updateMasterSafeOwners(); } catch (e) { console.error(e); } // Set states for successful creation setIsCreatingSafe(false); - setOptimismFailed(false); + // setOptimismFailed(false); + setGnosisFailed(false); }) .catch(async (e) => { console.error(e); + // Wait for 5 seconds before retrying await delayInSeconds(5); + // Retry const newRetries = retries - 1; if (newRetries <= 0) { @@ -95,7 +139,11 @@ export const SetupCreateSafe = () => { createSafeWithRetries(middlewareChain, newRetries); }); }, - [backupSigner, updateMasterSafeOwners, updateWallets], + [ + backupSigner, + // updateMasterSafeOwners, + updateWallets, + ], ); const creationStatusText = useMemo(() => { @@ -109,37 +157,47 @@ export const SetupCreateSafe = () => { /** * Avoid creating safes if any of the following conditions are met: */ - [optimismFailed, baseFailed, ethereumFailed].some((x) => x) || // any of the chains failed + [ + // optimismFailed, baseFailed, ethereumFailed + gnosisFailed, + ].some((x) => x) || // any of the chains failed isCreatingSafe //|| // already creating a safe // [isBaseSuccess, isEthereumSuccess, isOptimismSuccess].some((x) => !x) // any of the chains are not successful ) return; const chainsToCreateSafesFor = { - [MiddlewareChain.OPTIMISM]: masterSafeAddressKeyExistsForChain( - MiddlewareChain.OPTIMISM, - ), - [MiddlewareChain.ETHEREUM]: masterSafeAddressKeyExistsForChain( - MiddlewareChain.ETHEREUM, - ), - [MiddlewareChain.BASE]: masterSafeAddressKeyExistsForChain( - MiddlewareChain.BASE, - ), + // [MiddlewareChain.OPTIMISM]: masterSafeAddressKeyExistsForChain( + // MiddlewareChain.OPTIMISM, + // ), + // [MiddlewareChain.ETHEREUM]: masterSafeAddressKeyExistsForChain( + // MiddlewareChain.ETHEREUM, + // ), + // [MiddlewareChain.BASE]: masterSafeAddressKeyExistsForChain( + // MiddlewareChain.BASE, + // ), + [MiddlewareChain.GNOSIS]: !!masterSafeAddress, }; const safeCreationsRequired = Object.entries(chainsToCreateSafesFor).reduce( (acc, [chain, safeAddressAlreadyExists]) => { const middlewareChain = +chain as MiddlewareChain; if (safeAddressAlreadyExists) { + // switch (middlewareChain) { + // case MiddlewareChain.OPTIMISM: + // setIsOptimismSuccess(true); + // break; + // case MiddlewareChain.ETHEREUM: + // setIsEthereumSuccess(true); + // break; + // case MiddlewareChain.BASE: + // setIsBaseSuccess(true); + // break; + // } + switch (middlewareChain) { - case MiddlewareChain.OPTIMISM: - setIsOptimismSuccess(true); - break; - case MiddlewareChain.ETHEREUM: - setIsEthereumSuccess(true); - break; - case MiddlewareChain.BASE: - setIsBaseSuccess(true); + case MiddlewareChain.GNOSIS: + setIsGnosisSuccess(true); break; } return acc; @@ -169,14 +227,16 @@ export const SetupCreateSafe = () => { }, [ backupSigner, createSafeWithRetries, - optimismFailed, + masterSafeAddress, isCreatingSafe, - isBaseSuccess, - isEthereumSuccess, - isOptimismSuccess, - baseFailed, - ethereumFailed, - masterSafeAddressKeyExistsForChain, + // optimismFailed, + // isBaseSuccess, + // isEthereumSuccess, + // isOptimismSuccess, + // baseFailed, + // ethereumFailed, + isGnosisSuccess, + gnosisFailed, ]); useEffect(() => { @@ -193,39 +253,10 @@ export const SetupCreateSafe = () => { padding="80px 24px" gap={12} > - {optimismFailed ? ( - <> - logo - - Error, please restart the app and try again. - - - If the issue persists,{' '} - - contact Olas community support {UNICODE_SYMBOLS.EXTERNAL_LINK} - - . - - + {gnosisFailed ? ( + ) : ( - <> - logo - - {creationStatusText} - - - You will be redirected once the account is created. - - + )} diff --git a/frontend/components/SetupPage/Create/SetupEoaFunding.tsx b/frontend/components/SetupPage/Create/SetupEoaFunding.tsx index 9b566ca37..f9042667d 100644 --- a/frontend/components/SetupPage/Create/SetupEoaFunding.tsx +++ b/frontend/components/SetupPage/Create/SetupEoaFunding.tsx @@ -1,7 +1,7 @@ import { CopyOutlined } from '@ant-design/icons'; import { Flex, message, Tooltip, Typography } from 'antd'; import { BigNumber, ethers } from 'ethers'; -import { useCallback, useEffect, useMemo, useState } from 'react'; +import { useCallback, useEffect, useState } from 'react'; import styled from 'styled-components'; import { useInterval } from 'usehooks-ts'; @@ -10,15 +10,14 @@ import { CustomAlert } from '@/components/Alert'; import { CardFlex } from '@/components/styled/CardFlex'; import { CardSection } from '@/components/styled/CardSection'; import { CHAIN_CONFIG } from '@/config/chains'; -import { - BASE_PROVIDER, - ETHEREUM_PROVIDER, - OPTIMISM_PROVIDER, -} from '@/constants/providers'; +import { PROVIDERS } from '@/constants/providers'; +import { NA } from '@/constants/symbols'; import { MIN_ETH_BALANCE_THRESHOLDS } from '@/constants/thresholds'; +import { ChainId } from '@/enums/Chain'; import { SetupScreen } from '@/enums/SetupScreen'; +import { useMasterBalances } from '@/hooks/useBalanceContext'; import { useSetup } from '@/hooks/useSetup'; -import { useWallet } from '@/hooks/useWallet'; +import { useMasterWalletContext } from '@/hooks/useWallet'; import { Address } from '@/types/Address'; import { copyToClipboard } from '@/utils/copyToClipboard'; import { delayInSeconds } from '@/utils/delay'; @@ -40,9 +39,18 @@ const AccountCreationCard = styled.div` const ICON_STYLE = { color: '#606F85' }; +const statusMessage = (isFunded?: boolean) => { + if (isFunded) { + return 'Funds have been received!'; + } else { + return 'Waiting for transaction'; + } +}; + type SetupEoaFundingWaitingProps = { chainName: string }; const SetupEoaFundingWaiting = ({ chainName }: SetupEoaFundingWaitingProps) => { - const { masterEoaAddress } = useWallet(); + const { masterEoa } = useMasterWalletContext(); + const masterEoaAddress = masterEoa?.address; return ( <> @@ -80,7 +88,7 @@ const SetupEoaFundingWaiting = ({ chainName }: SetupEoaFundingWaitingProps) => { - {`ETH: ${masterEoaAddress}`} + {`XDAI: ${masterEoaAddress || NA}`} {/* { const { goto } = useSetup(); - const statusMessage = useMemo(() => { - if (isFunded) { - return 'Funds have been received!'; - } else { - return 'Waiting for transaction'; - } - }, [isFunded]); - useEffect(() => { message.success(`${chainName} funds have been received!`); @@ -141,7 +141,7 @@ export const SetupEoaFundingForChain = ({ borderbottom={isFunded ? 'true' : 'false'} > - Status: {statusMessage} + Status: {statusMessage(isFunded)} {!isFunded && } @@ -149,29 +149,38 @@ export const SetupEoaFundingForChain = ({ ); }; +// TODO: chain independent const eoaFundingMap = { - [MiddlewareChain.OPTIMISM]: { - provider: OPTIMISM_PROVIDER, - chainConfig: CHAIN_CONFIG.OPTIMISM, - requiredEth: - MIN_ETH_BALANCE_THRESHOLDS[MiddlewareChain.OPTIMISM].safeCreation, - }, - [MiddlewareChain.ETHEREUM]: { - provider: ETHEREUM_PROVIDER, - chainConfig: CHAIN_CONFIG.ETHEREUM, - requiredEth: - MIN_ETH_BALANCE_THRESHOLDS[MiddlewareChain.ETHEREUM].safeCreation, - }, - [MiddlewareChain.BASE]: { - provider: BASE_PROVIDER, - chainConfig: CHAIN_CONFIG.BASE, - requiredEth: MIN_ETH_BALANCE_THRESHOLDS[MiddlewareChain.BASE].safeCreation, + // [MiddlewareChain.OPTIMISM]: { + // provider: OPTIMISM_PROVIDER, + // chainConfig: CHAIN_CONFIG.OPTIMISM, + // requiredEth: + // MIN_ETH_BALANCE_THRESHOLDS[MiddlewareChain.OPTIMISM].safeCreation, + // }, + // [MiddlewareChain.ETHEREUM]: { + // provider: ETHEREUM_PROVIDER, + // chainConfig: CHAIN_CONFIG.ETHEREUM, + // requiredEth: + // MIN_ETH_BALANCE_THRESHOLDS[MiddlewareChain.ETHEREUM].safeCreation, + // }, + // [MiddlewareChain.BASE]: { + // provider: BASE_PROVIDER, + // chainConfig: CHAIN_CONFIG.BASE, + // requiredEth: MIN_ETH_BALANCE_THRESHOLDS[MiddlewareChain.BASE].safeCreation, + // }, + [MiddlewareChain.GNOSIS]: { + provider: PROVIDERS[ChainId.Gnosis].provider, + chainConfig: CHAIN_CONFIG[ChainId.Gnosis], + requiredEth: MIN_ETH_BALANCE_THRESHOLDS[ChainId.Gnosis].safeCreation, }, }; export const SetupEoaFunding = () => { const { goto } = useSetup(); - const { masterEoaAddress } = useWallet(); + const { masterEoa } = useMasterWalletContext(); + const { masterWalletBalances } = useMasterBalances(); + const masterEoaAddress = masterEoa?.address; + const [currentChain, setCurrentChain] = useState( +Object.keys(eoaFundingMap)[0] as MiddlewareChain, ); @@ -225,6 +234,14 @@ export const SetupEoaFunding = () => { goto(SetupScreen.SetupCreateSafe); }, 5000); + const eoaBalance = masterWalletBalances?.find( + (balance) => balance.walletAddress === masterEoaAddress, + ); + const isFunded = + eoaBalance?.chainId === ChainId.Gnosis && + eoaBalance.balance >= + MIN_ETH_BALANCE_THRESHOLDS[ChainId.Gnosis].safeCreation; + return ( @@ -235,15 +252,15 @@ export const SetupEoaFunding = () => { The app needs these funds to create your account on-chain. - {/* - Status: {statusMessage} + Status: {statusMessage(isFunded)} - */} + { const [form] = Form.useForm<{ password: string; terms: boolean }>(); const [isLoading, setIsLoading] = useState(false); - const isTermsAccepted = Form.useWatch('terms', form); const handleCreateEoa = async ({ password }: { password: string }) => { @@ -26,7 +25,7 @@ export const SetupPassword = () => { setIsLoading(true); AccountService.createAccount(password) .then(() => AccountService.loginAccount(password)) - .then(() => WalletService.createEoa(MiddlewareChain.OPTIMISM)) + .then(() => WalletService.createEoa(MiddlewareChain.GNOSIS)) // TODO: chain independent .then(({ mnemonic }: { mnemonic: string[] }) => { setMnemonic(mnemonic); goto(SetupScreen.SetupSeedPhrase); diff --git a/frontend/components/SetupPage/Create/SetupSeedPhrase.tsx b/frontend/components/SetupPage/Create/SetupSeedPhrase.tsx index 46a8d1bca..dd8811f61 100644 --- a/frontend/components/SetupPage/Create/SetupSeedPhrase.tsx +++ b/frontend/components/SetupPage/Create/SetupSeedPhrase.tsx @@ -18,6 +18,7 @@ export const SetupSeedPhrase = () => { Back up seed phrase + Seed phrase is needed to regain access to your account if you forget @@ -33,6 +34,7 @@ export const SetupSeedPhrase = () => { ))} + + If you don’t have the seed phrase but added a backup wallet to your @@ -134,6 +136,7 @@ export const SetupRestoreViaSeed = () => { export const SetupRestoreSetPassword = () => { const { goto } = useSetup(); const [password, setPassword] = useState(''); + return ( { const { goto } = useSetup(); const { goto: gotoPage } = usePageState(); - const { masterSafeAddress, masterWallets: wallets } = - useMasterWalletContext(); - const { isBalanceLoaded, masterEoaBalance: eoaBalance } = useBalanceContext(); + const { selectedService } = useServices(); + const { + masterSafes, + masterWallets: wallets, + masterEoa, + } = useMasterWalletContext(); + const { isLoaded } = useBalanceContext(); + const { masterWalletBalances } = useMasterBalances(); + + const masterSafe = + masterSafes?.find( + (safe) => safe.chainId === selectedService?.home_chain_id, + ) ?? null; + const eoaBalanceEth = masterWalletBalances?.find( + (balance) => balance.walletAddress === masterEoa?.address, + ); const [isLoggingIn, setIsLoggingIn] = useState(false); const [canNavigate, setCanNavigate] = useState(false); @@ -157,11 +174,11 @@ export const SetupWelcomeLogin = () => { useEffect(() => { // Navigate only when wallets and balances are loaded // To check if some setup steps were missed - if (canNavigate && wallets?.length && isBalanceLoaded) { + if (canNavigate && wallets?.length && isLoaded) { setIsLoggingIn(false); - if (!eoaBalance?.ETH) { + if (!eoaBalanceEth) { goto(SetupScreen.SetupEoaFundingIncomplete); - } else if (!masterSafeAddress) { + } else if (!masterSafe?.address) { goto(SetupScreen.SetupCreateSafe); } else { gotoPage(Pages.Main); @@ -169,11 +186,11 @@ export const SetupWelcomeLogin = () => { } }, [ canNavigate, - eoaBalance?.ETH, + eoaBalanceEth, goto, gotoPage, - isBalanceLoaded, - masterSafeAddress, + isLoaded, + masterSafe?.address, wallets?.length, ]); diff --git a/frontend/components/SetupPage/index.tsx b/frontend/components/SetupPage/index.tsx index 412f4bc83..935ac2810 100644 --- a/frontend/components/SetupPage/index.tsx +++ b/frontend/components/SetupPage/index.tsx @@ -16,6 +16,10 @@ import { } from './SetupRestore'; import { SetupWelcome } from './SetupWelcome'; +const UnexpectedError = () => ( +
Something went wrong!
+); + export const Setup = () => { const { setupObject } = useContext(SetupContext); const setupScreen = useMemo(() => { @@ -45,7 +49,7 @@ export const Setup = () => { case SetupScreen.RestoreViaBackup: return ; default: - return <>Error; + return ; } }, [setupObject.state]); diff --git a/frontend/config/mechs.ts b/frontend/config/mechs.ts index 375171852..c55eb15c9 100644 --- a/frontend/config/mechs.ts +++ b/frontend/config/mechs.ts @@ -1,3 +1,4 @@ +import { JsonFragment } from '@ethersproject/abi'; import { Contract as MulticallContract } from 'ethers-multicall'; import { AGENT_MECH_ABI } from '@/abis/agentMech'; @@ -24,14 +25,18 @@ export const MECHS: Mechs = { name: 'Agent Mech', contract: new MulticallContract( '0x77af31De935740567Cf4fF1986D04B2c964A786a', - AGENT_MECH_ABI, + AGENT_MECH_ABI.filter( + (abi) => (abi as JsonFragment).type === 'function', + ) as JsonFragment[], ), }, [MechType.Marketplace]: { name: 'Mech Marketplace', contract: new MulticallContract( '0x4554fE75c1f5576c1d7F765B2A036c199Adae329', - MECH_MARKETPLACE_ABI, + MECH_MARKETPLACE_ABI.filter( + (abi) => (abi as JsonFragment).type === 'function', + ) as JsonFragment[], ), }, }, diff --git a/frontend/config/stakingPrograms/index.ts b/frontend/config/stakingPrograms/index.ts index 735d44e8d..6a2e9adf9 100644 --- a/frontend/config/stakingPrograms/index.ts +++ b/frontend/config/stakingPrograms/index.ts @@ -9,10 +9,10 @@ import { GNOSIS_STAKING_PROGRAMS, GNOSIS_STAKING_PROGRAMS_CONTRACT_ADDRESSES, } from './gnosis'; -import { - OPTIMISM_STAKING_PROGRAMS, - OPTIMISM_STAKING_PROGRAMS_CONTRACT_ADDRESSES, -} from './optimism'; +// import { +// OPTIMISM_STAKING_PROGRAMS, +// OPTIMISM_STAKING_PROGRAMS_CONTRACT_ADDRESSES, +// } from './optimism'; /** * Single non-chain specific staking program configuration @@ -38,19 +38,19 @@ export const STAKING_PROGRAMS: { [chainId: number | ChainId]: StakingProgramMap; } = { [ChainId.Gnosis]: GNOSIS_STAKING_PROGRAMS, - [ChainId.Optimism]: OPTIMISM_STAKING_PROGRAMS, + // [ChainId.Optimism]: OPTIMISM_STAKING_PROGRAMS, }; export const STAKING_PROGRAM_ADDRESS: { [chainId: number | ChainId]: Record; } = { [ChainId.Gnosis]: GNOSIS_STAKING_PROGRAMS_CONTRACT_ADDRESSES, - [ChainId.Optimism]: OPTIMISM_STAKING_PROGRAMS_CONTRACT_ADDRESSES, + // [ChainId.Optimism]: OPTIMISM_STAKING_PROGRAMS_CONTRACT_ADDRESSES, }; export const INITIAL_DEFAULT_STAKING_PROGRAM_IDS: { [chainId: number | ChainId]: StakingProgramId; } = { [ChainId.Gnosis]: StakingProgramId.PearlBeta, - [ChainId.Optimism]: StakingProgramId.OptimusAlpha, + // [ChainId.Optimism]: StakingProgramId.OptimusAlpha, }; diff --git a/frontend/constants/thresholds.ts b/frontend/constants/thresholds.ts index 09d2b0c43..e85fa3086 100644 --- a/frontend/constants/thresholds.ts +++ b/frontend/constants/thresholds.ts @@ -1,13 +1,15 @@ import { ChainId } from '@/enums/Chain'; +// TODO + /** * @warning must be updated to be dynamic */ export const MIN_ETH_BALANCE_THRESHOLDS = { - // [Chain.GNOSIS]: { - // safeCreation: 1.5, - // safeAddSigner: 0.1, - // }, + [ChainId.Gnosis]: { + safeCreation: 1.5, + safeAddSigner: 0.1, + }, [ChainId.Optimism]: { safeCreation: 0.005, safeAddSigner: 0.005, diff --git a/frontend/pages/_app.tsx b/frontend/pages/_app.tsx index 86d81156d..63ecbdf74 100644 --- a/frontend/pages/_app.tsx +++ b/frontend/pages/_app.tsx @@ -38,37 +38,37 @@ export default function App({ Component, pageProps }: AppProps) { - - - - - - - - - - - - {isMounted ? ( - + + + + + + + + + + + + + {isMounted ? ( - - ) : null} - - - - - - - - - - - + ) : null} + + + + + + + + + + + +