diff --git a/assets/icons/danger.com.svg.react b/assets/icons/danger.com.svg.react new file mode 100644 index 00000000..d665acb9 --- /dev/null +++ b/assets/icons/danger.com.svg.react @@ -0,0 +1 @@ + diff --git a/modules/blockChain/hooks/useErrorMessage.ts b/modules/blockChain/hooks/useErrorMessage.ts index f079d939..edf7f18f 100644 --- a/modules/blockChain/hooks/useErrorMessage.ts +++ b/modules/blockChain/hooks/useErrorMessage.ts @@ -1,23 +1,21 @@ -import { useSupportedChains, useConnectorError } from 'reef-knot/web3-react' -import { CHAINS } from '@lido-sdk/constants' import { useMemo } from 'react' +import { useConfig } from 'modules/config/hooks/useConfig' +import { useSupportedChains, useConnectorError } from 'reef-knot/web3-react' -export const useErrorMessage = (): string | undefined => { +import { getChainName } from 'modules/blockChain/chains' + +export function useErrorMessage() { const error = useConnectorError() - const { isUnsupported, supportedChains } = useSupportedChains() + const { isUnsupported } = useSupportedChains() + const { supportedChainIds } = useConfig() const chains = useMemo(() => { - const chainNames = supportedChains.map( - ({ chainId, name }) => CHAINS[chainId] || name, - ) - const lastChain = chainNames.pop() - const chainsArray = [chainNames.join(', '), lastChain] - - return chainsArray.filter(chain => chain).join(' or ') - }, [supportedChains]) + const networksList = supportedChainIds.map(chainId => getChainName(chainId)) + return networksList.join(' / ') + }, [supportedChainIds]) if (isUnsupported) { - return `Unsupported chain. Please switch to ${chains} in your wallet` + return `Unsupported chain. Please switch to ${chains} in your wallet.` } return error?.message diff --git a/modules/blockChain/ui/NetworkSwitcher/NetworkSwitcher.tsx b/modules/blockChain/ui/NetworkSwitcher/NetworkSwitcher.tsx index b733aa77..67acba8c 100644 --- a/modules/blockChain/ui/NetworkSwitcher/NetworkSwitcher.tsx +++ b/modules/blockChain/ui/NetworkSwitcher/NetworkSwitcher.tsx @@ -1,24 +1,18 @@ -import { useConfig } from 'modules/config/hooks/useConfig' +import { useErrorMessage } from 'modules/blockChain/hooks/useErrorMessage' -import { Text } from 'modules/shared/ui/Common/Text' -import { Title } from 'modules/shared/ui/Common/Title' - -import { getChainName } from 'modules/blockChain/chains' +import { Container } from '@lidofinance/lido-ui' +import { Wrap } from './NetworkSwitcherStyle' +import DangerIconSVG from 'assets/icons/danger.com.svg.react' export function NetworkSwitcher() { - const { supportedChainIds } = useConfig() + const errorMessage = useErrorMessage() return ( - <> - Please, switch to one of supported network:</>} - /> - <Text size={16} weight={500} isCentered> - {supportedChainIds.map(supportedChainId => ( - <div key={supportedChainId}>{getChainName(supportedChainId)}</div> - ))} - </Text> - </> + <Container size="full"> + <Wrap> + <DangerIconSVG /> + <span>{errorMessage}</span> + </Wrap> + </Container> ) } diff --git a/modules/blockChain/ui/NetworkSwitcher/NetworkSwitcherStyle.ts b/modules/blockChain/ui/NetworkSwitcher/NetworkSwitcherStyle.ts index 1b568714..73d8a849 100644 --- a/modules/blockChain/ui/NetworkSwitcher/NetworkSwitcherStyle.ts +++ b/modules/blockChain/ui/NetworkSwitcher/NetworkSwitcherStyle.ts @@ -1,7 +1,26 @@ import styled from 'styled-components' -export const NetworksBox = styled.div` +export const Wrap = styled.div` display: flex; - justify-content: center; - gap: 10px; + align-items: center; + margin-bottom: ${({ theme }) => theme.spaceMap.xxl}px; + padding: ${({ theme }) => theme.spaceMap.lg}px; + color: var(--lido-color-textDark); + font-size: ${({ theme }) => theme.fontSizesMap.xxs}px; + font-weight: 400; + border-radius: ${({ theme }) => theme.borderRadiusesMap.md}px; + background: radial-gradient( + 76.72% 76.72% at 50% 67.59%, + rgba(255, 201, 208, 0.6) 0%, + rgba(255, 237, 237, 0.6) 68.99%, + rgba(255, 255, 255, 0.6) 100% + ); + box-shadow: inset 0px -20px 93px rgba(255, 214, 0, 0.44); + + & svg { + display: block; + flex: 0 0 auto; + margin-right: ${({ theme }) => theme.spaceMap.sm}px; + fill: var(--lido-color-textDark); + } ` diff --git a/modules/motions/evmAddresses.ts b/modules/motions/evmAddresses.ts index 96029df3..7bfab5e3 100644 --- a/modules/motions/evmAddresses.ts +++ b/modules/motions/evmAddresses.ts @@ -12,7 +12,6 @@ export const EvmAddressesByChain = { [CHAINS.Mainnet]: { [MotionType.NodeOperatorIncreaseLimit]: '0xFeBd8FAC16De88206d4b18764e826AF38546AfE0', - [MotionType.LEGOTopUp]: '0x648C8Be548F43eca4e482C0801Ebccccfb944931', [MotionType.AllowedRecipientTopUpTrpLdo]: '0xBd2b6dC189EefD51B273F5cb2d99BA1ce565fb8C', [MotionType.LegoLDOTopUp]: '0x00caAeF11EC545B192f16313F53912E453c91458', @@ -20,8 +19,6 @@ export const EvmAddressesByChain = { [MotionType.RccDAITopUp]: '0x84f74733ede9bFD53c1B3Ea96338867C94EC313e', [MotionType.PmlDAITopUp]: '0x4E6D3A5023A38cE2C4c5456d3760357fD93A22cD', [MotionType.AtcDAITopUp]: '0x67Fb97ABB9035E2e93A7e3761a0d0571c5d7CD07', - [MotionType.GasFunderETHTopUp]: - '0x41F9daC5F89092dD6061E59578A2611849317dc8', [MotionType.StethRewardProgramAdd]: '0x935cb3366Faf2cFC415B2099d1F974Fd27202b77', [MotionType.StethRewardProgramRemove]: @@ -37,6 +34,9 @@ export const EvmAddressesByChain = { // next motion factories are @deprecated // we are keeping them here to display history data + [MotionType.LEGOTopUp]: '0x648C8Be548F43eca4e482C0801Ebccccfb944931', + [MotionType.GasFunderETHTopUp]: + '0x41F9daC5F89092dD6061E59578A2611849317dc8', [MotionType.RewardProgramAdd]: '0x9D15032b91d01d5c1D940eb919461426AB0dD4e3', [MotionType.RewardProgramRemove]: '0xc21e5e72Ffc223f02fC410aAedE3084a63963932', @@ -66,7 +66,6 @@ export const EvmAddressesByChain = { [CHAINS.Goerli]: { [MotionType.NodeOperatorIncreaseLimit]: '0xE033673D83a8a60500BcE02aBd9007ffAB587714', - [MotionType.LEGOTopUp]: '0xb2bcf211F103d7F13789394DD475c2274e044C4C', [MotionType.AllowedRecipientTopUpTrpLdo]: '0x43f33C52156d1Fb2eA24d82aBfD342E69835E79f', [MotionType.LegoLDOTopUp]: '0xc39Dd5B66968e364D99e0c9E7089049351AB89CA', @@ -74,7 +73,6 @@ export const EvmAddressesByChain = { [MotionType.RccDAITopUp]: '0xd0411e7c4A24E7d4509D5F13AEd19aeb8e5644AB', [MotionType.PmlDAITopUp]: '0xc749aD24572263887Bc888d3Cb854FCD50eCCB61', [MotionType.AtcDAITopUp]: '0xF4b8b5760EE4b5c5Cb154edd0f0841465d821006', - [MotionType.GasFunderETHTopUp]: '0x', [MotionType.StethRewardProgramAdd]: '0x785A8B1CDC03Bb191670Ed4696e9ED5B11Af910A', [MotionType.StethRewardProgramRemove]: @@ -90,6 +88,8 @@ export const EvmAddressesByChain = { // next motion factories are @deprecated // we are keeping them here to display history data + [MotionType.LEGOTopUp]: '0xb2bcf211F103d7F13789394DD475c2274e044C4C', + [MotionType.GasFunderETHTopUp]: '0x', [MotionType.RewardProgramAdd]: '0x5560d40b00EA3a64E9431f97B3c79b04e0cdF6F2', [MotionType.RewardProgramRemove]: '0x31B68d81125E52fE1aDfe4076F8945D1014753b5', diff --git a/modules/motions/hooks/useRegistryWithLimits.ts b/modules/motions/hooks/useRegistryWithLimits.ts index a504af85..5b8ae9ed 100644 --- a/modules/motions/hooks/useRegistryWithLimits.ts +++ b/modules/motions/hooks/useRegistryWithLimits.ts @@ -48,7 +48,7 @@ export const REGISTRY_WITH_LIMITS_BY_MOTION_TYPE = { [MotionType.StethGasSupplyAdd]: ContractStethGasSupplyRegistry, [MotionType.StethGasSupplyRemove]: ContractStethGasSupplyRegistry, [MotionType.StethGasSupplyTopUp]: ContractStethGasSupplyRegistry, -} +} as const type HookArgs = { registryType: keyof typeof REGISTRY_WITH_LIMITS_BY_MOTION_TYPE diff --git a/modules/motions/providers/motionDetailed.tsx b/modules/motions/providers/motionDetailed.tsx index ca2ffb70..2370afd1 100644 --- a/modules/motions/providers/motionDetailed.tsx +++ b/modules/motions/providers/motionDetailed.tsx @@ -7,7 +7,6 @@ import { getMotionTypeByScriptFactory, getMotionTypeDisplayName, getEventMotionCreated, - getContractMethodParams, estimateGasFallback, } from 'modules/motions/utils' import { @@ -130,20 +129,17 @@ export const MotionDetailedProvider: FC<MotionDetailedProps> = props => { motion.id, ) const gasLimit = await estimateGasFallback( - contractEasyTrack.estimateGas.enactMotion(motion.id, _callData, { - ...getContractMethodParams(motion.evmScriptFactory, 'enact'), - }), + contractEasyTrack.estimateGas.enactMotion(motion.id, _callData), ) const tx = await contractEasyTrack.populateTransaction.enactMotion( motion.id, _callData, { gasLimit, - ...getContractMethodParams(motion.evmScriptFactory, 'enact'), }, ) return tx - }, [contractEasyTrack, motion.evmScriptFactory, motion.id]) + }, [contractEasyTrack, motion.id]) const txEnact = useTransactionSender(populateEnact, { onFinish: onInvalidate, diff --git a/modules/motions/types.ts b/modules/motions/types.ts index 262cd065..a8b0aa09 100644 --- a/modules/motions/types.ts +++ b/modules/motions/types.ts @@ -2,25 +2,32 @@ import type { BigNumber } from 'ethers' import type { PromiseValue } from 'type-fest' import type { EasyTrackAbi } from 'generated' -export const MotionType = { +// Only motions currently supported to start +export const MotionTypeForms = { NodeOperatorIncreaseLimit: 'NodeOperatorIncreaseLimit', - LEGOTopUp: 'LEGOTopUp', AllowedRecipientTopUpTrpLdo: 'AllowedRecipientTopUpTrpLdo', LegoLDOTopUp: 'LegoLDOTopUp', LegoDAITopUp: 'LegoDAITopUp', RccDAITopUp: 'RccDAITopUp', PmlDAITopUp: 'PmlDAITopUp', AtcDAITopUp: 'AtcDAITopUp', - GasFunderETHTopUp: 'GasFunderETHTopUp', StethRewardProgramAdd: 'StethRewardProgramAdd', StethRewardProgramRemove: 'StethRewardProgramRemove', StethRewardProgramTopUp: 'StethRewardProgramTopUp', StethGasSupplyAdd: 'StethGasSupplyAdd', StethGasSupplyRemove: 'StethGasSupplyRemove', StethGasSupplyTopUp: 'StethGasSupplyTopUp', +} as const +// intentionally +// eslint-disable-next-line @typescript-eslint/no-redeclare +export type MotionTypeForms = + typeof MotionTypeForms[keyof typeof MotionTypeForms] - // next motion types are retired - // we are keeping them here to display history data +// next motion types are retired +// we are keeping them here to display history data +export const MotionTypeDisplayOnly = { + LEGOTopUp: 'LEGOTopUp', + GasFunderETHTopUp: 'GasFunderETHTopUp', RewardProgramAdd: 'RewardProgramAdd', RewardProgramRemove: 'RewardProgramRemove', RewardProgramTopUp: 'RewardProgramTopUp', @@ -36,30 +43,16 @@ export const MotionType = { } as const // intentionally // eslint-disable-next-line @typescript-eslint/no-redeclare -export type MotionType = typeof MotionType[keyof typeof MotionType] +export type MotionTypeDisplayOnly = + typeof MotionTypeDisplayOnly[keyof typeof MotionTypeDisplayOnly] -// Only motions currently supported to start -export const MotionTypeForms = { - NodeOperatorIncreaseLimit: MotionType.NodeOperatorIncreaseLimit, - LEGOTopUp: MotionType.LEGOTopUp, - AllowedRecipientTopUpTrpLdo: MotionType.AllowedRecipientTopUpTrpLdo, - LegoLDOTopUp: MotionType.LegoLDOTopUp, - LegoDAITopUp: MotionType.LegoDAITopUp, - RccDAITopUp: MotionType.RccDAITopUp, - PmlDAITopUp: MotionType.PmlDAITopUp, - AtcDAITopUp: MotionType.AtcDAITopUp, - GasFunderETHTopUp: MotionType.GasFunderETHTopUp, - StethRewardProgramAdd: MotionType.StethRewardProgramAdd, - StethRewardProgramRemove: MotionType.StethRewardProgramRemove, - StethRewardProgramTopUp: MotionType.StethRewardProgramTopUp, - StethGasSupplyAdd: MotionType.StethGasSupplyAdd, - StethGasSupplyRemove: MotionType.StethGasSupplyRemove, - StethGasSupplyTopUp: MotionType.StethGasSupplyTopUp, +export const MotionType = { + ...MotionTypeForms, + ...MotionTypeDisplayOnly, } as const // intentionally // eslint-disable-next-line @typescript-eslint/no-redeclare -export type MotionTypeForms = - typeof MotionTypeForms[keyof typeof MotionTypeForms] +export type MotionType = typeof MotionType[keyof typeof MotionType] export const MotionStatus = { ACTIVE: 'ACTIVE', diff --git a/modules/motions/ui/MotionFormStartNew/Parts/StartNewLEGO.tsx b/modules/motions/ui/MotionFormStartNew/Parts/StartNewLEGO.tsx deleted file mode 100644 index c10febbc..00000000 --- a/modules/motions/ui/MotionFormStartNew/Parts/StartNewLEGO.tsx +++ /dev/null @@ -1,170 +0,0 @@ -import { utils } from 'ethers' - -import { useCallback, Fragment } from 'react' -import { useFieldArray, useFormContext } from 'react-hook-form' -import { useWeb3 } from 'modules/blockChain/hooks/useWeb3' -import { useLegoTokenOptions } from 'modules/motions/hooks/useLegoTokenOptions' - -import { ButtonIcon, Plus } from '@lidofinance/lido-ui' -import { PageLoader } from 'modules/shared/ui/Common/PageLoader' -import { InputControl } from 'modules/shared/ui/Controls/Input' -import { SelectControl, Option } from 'modules/shared/ui/Controls/Select' -import { - Fieldset, - MessageBox, - RemoveItemButton, - FieldsWrapper, - FieldsHeader, - FieldsHeaderDesc, -} from '../CreateMotionFormStyle' - -import { ContractEvmLEGOTopUp } from 'modules/blockChain/contracts' -import { MotionType } from 'modules/motions/types' -import { createMotionFormPart } from './createMotionFormPart' -import { validateToken } from 'modules/tokens/utils/validateToken' -import { estimateGasFallback } from 'modules/motions/utils/estimateGasFallback' -import { TRANSITION_LIMITS, tokenLimitError } from 'modules/motions/constants' - -type TokenData = { - address: string - amount: string -} - -export const formParts = createMotionFormPart({ - motionType: MotionType.LEGOTopUp, - populateTx: async ({ evmScriptFactory, formData, contract }) => { - const encodedCallData = new utils.AbiCoder().encode( - ['address[]', 'uint256[]'], - [ - formData.tokens.map(t => utils.getAddress(t.address)), - formData.tokens.map(t => utils.parseEther(t.amount)), - ], - ) - const gasLimit = await estimateGasFallback( - contract.estimateGas.createMotion(evmScriptFactory, encodedCallData), - ) - const tx = await contract.populateTransaction.createMotion( - evmScriptFactory, - encodedCallData, - { gasLimit }, - ) - return tx - }, - getDefaultFormData: () => ({ - tokens: [{ address: '', amount: '' }] as TokenData[], - }), - Component: function StartNewMotionMotionFormLego({ - fieldNames, - submitAction, - }) { - const { chainId, walletAddress } = useWeb3() - const tokenOptions = useLegoTokenOptions() - const fieldsArr = useFieldArray({ name: fieldNames.tokens }) - const trustedCaller = ContractEvmLEGOTopUp.useSwrWeb3('trustedCaller', []) - const isTrustedCallerConnected = trustedCaller.data === walletAddress - - const handleAddToken = useCallback( - () => fieldsArr.append({ address: '', amount: '' }), - [fieldsArr], - ) - - const handleRemoveToken = useCallback( - (i: number) => fieldsArr.remove(i), - [fieldsArr], - ) - - const { watch } = useFormContext() - const selectedTokens: TokenData[] = watch(fieldNames.tokens) - - const getFilteredOptions = (fieldIdx: number) => { - const thatAddress = selectedTokens[fieldIdx].address - const selectedAddresses = selectedTokens.map(({ address }) => address) - return tokenOptions.filter( - ({ value }) => - !selectedAddresses.includes(value) || value === thatAddress, - ) - } - - const getTokenName = (fieldIdx: number) => { - return tokenOptions.find( - ({ value }) => value === selectedTokens[fieldIdx].address, - )?.label - } - - if (trustedCaller.initialLoading) { - return <PageLoader /> - } - - if (!isTrustedCallerConnected) { - return <MessageBox>You should be connected as trusted caller</MessageBox> - } - - return ( - <> - {fieldsArr.fields.map((item, i) => ( - <Fragment key={item.id}> - <FieldsWrapper> - <FieldsHeader> - <FieldsHeaderDesc>Token #{i + 1}</FieldsHeaderDesc> - {fieldsArr.fields.length > 1 && ( - <RemoveItemButton onClick={() => handleRemoveToken(i)}> - Remove token - </RemoveItemButton> - )} - </FieldsHeader> - <Fieldset> - <SelectControl - label="Token" - name={`${fieldNames.tokens}.${i}.address`} - rules={{ required: 'Field is required' }} - > - {getFilteredOptions(i).map(({ label, value }, j) => ( - <Option key={j} value={value} children={label} /> - ))} - </SelectControl> - </Fieldset> - - <Fieldset> - <InputControl - label="Amount" - name={`${fieldNames.tokens}.${i}.amount`} - rules={{ - required: 'Field is required', - validate: value => { - const check1 = validateToken(value) - if (typeof check1 === 'string') { - return check1 - } - const { address } = selectedTokens[i] - const limit = TRANSITION_LIMITS[chainId][address] - if (Number(value) > limit) { - return tokenLimitError(getTokenName(i), limit) - } - return true - }, - }} - /> - </Fieldset> - </FieldsWrapper> - </Fragment> - ))} - - {fieldsArr.fields.length < tokenOptions.length && ( - <Fieldset> - <ButtonIcon - type="button" - variant="ghost" - size="sm" - children="One more token" - onClick={handleAddToken} - icon={<Plus />} - color="secondary" - /> - </Fieldset> - )} - - {submitAction} - </> - ) - }, -}) diff --git a/modules/motions/ui/MotionFormStartNew/Parts/index.ts b/modules/motions/ui/MotionFormStartNew/Parts/index.ts index 72acff3a..0b6856bf 100644 --- a/modules/motions/ui/MotionFormStartNew/Parts/index.ts +++ b/modules/motions/ui/MotionFormStartNew/Parts/index.ts @@ -1,7 +1,6 @@ import { MotionTypeForms } from 'modules/motions/types' import * as formNodeOperators from './StartNewNodeOperators' -import * as formLEGO from './StartNewLEGO' import * as formAllowedRecipientAdd from './StartNewAllowedRecipientAdd' import * as formAllowedRecipientRemove from './StartNewAllowedRecipientRemove' import * as formAllowedRecipientTopUp from './StartNewAllowedRecipientTopUp' @@ -9,7 +8,6 @@ import * as StartNewTopUpWithLimits from './StartNewTopUpWithLimits' export const formParts = { [MotionTypeForms.NodeOperatorIncreaseLimit]: formNodeOperators.formParts, - [MotionTypeForms.LEGOTopUp]: formLEGO.formParts, [MotionTypeForms.AllowedRecipientTopUpTrpLdo]: formAllowedRecipientTopUp.formParts({ registryType: MotionTypeForms.AllowedRecipientTopUpTrpLdo, @@ -29,9 +27,6 @@ export const formParts = { [MotionTypeForms.AtcDAITopUp]: StartNewTopUpWithLimits.formParts({ registryType: MotionTypeForms.AtcDAITopUp, }), - [MotionTypeForms.GasFunderETHTopUp]: StartNewTopUpWithLimits.formParts({ - registryType: MotionTypeForms.GasFunderETHTopUp, - }), [MotionTypeForms.StethRewardProgramAdd]: formAllowedRecipientAdd.formParts({ registryType: MotionTypeForms.StethRewardProgramAdd, }), diff --git a/modules/motions/utils/getContractMethodParams.ts b/modules/motions/utils/getContractMethodParams.ts deleted file mode 100644 index 1d38bfd2..00000000 --- a/modules/motions/utils/getContractMethodParams.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { get } from 'lodash' -import { CHAINS } from '@lido-sdk/constants' -import { EvmAddressesByChain } from '../evmAddresses' - -const ACCESS_LISTS_MAP = { - [EvmAddressesByChain[CHAINS.Mainnet].LEGOTopUp]: { - enact: { - type: 2, - accessList: { - '0x3e40D73EB977Dc6a537aF587D48316feE66E9C8c': [ - '0xebb05b386a8d34882b8711d156f463690983dc47815980fb82aeeff1aa43579e', - '0x665fd576fbbe6f247aff98f5c94a561e3f71ec2d3c988d56f12d342396c50cea', - '0xdee64df20d65e53d7f51cb6ab6d921a0a6a638a91e942e1d8d02df28e31c038e', - ], - }, - }, - } as const, - [EvmAddressesByChain[CHAINS.Goerli].LEGOTopUp]: { - enact: { - type: 2, - accessList: { - '0x4333218072d5d7008546737786663c38b4d561a4': [ - '0xebb05b386a8d34882b8711d156f463690983dc47815980fb82aeeff1aa43579e', - '0x665fd576fbbe6f247aff98f5c94a561e3f71ec2d3c988d56f12d342396c50cea', - '0xdee64df20d65e53d7f51cb6ab6d921a0a6a638a91e942e1d8d02df28e31c038e', - ], - }, - }, - } as const, -} as const - -export function getContractMethodParams(contract: string, method: string) { - return get(ACCESS_LISTS_MAP, [contract, method], {}) -} diff --git a/modules/motions/utils/getMotionTypeDisplayName.ts b/modules/motions/utils/getMotionTypeDisplayName.ts index 03f6b0c6..cfc339f3 100644 --- a/modules/motions/utils/getMotionTypeDisplayName.ts +++ b/modules/motions/utils/getMotionTypeDisplayName.ts @@ -7,14 +7,12 @@ export const MotionTypeDisplayNames: Record< > = { [MotionType.NodeOperatorIncreaseLimit]: 'Increase node operator staking limit', - [MotionType.LEGOTopUp]: 'Top up LEGO', [MotionType.AllowedRecipientTopUpTrpLdo]: 'Top up LDO TRP', [MotionType.LegoLDOTopUp]: 'Top up LEGO LDO', [MotionType.LegoDAITopUp]: 'Top up LEGO DAI', [MotionType.RccDAITopUp]: 'Top up RCC DAI', [MotionType.PmlDAITopUp]: 'Top up PML DAI', [MotionType.AtcDAITopUp]: 'Top up ATC DAI', - [MotionType.GasFunderETHTopUp]: 'Top up Gas Funder ETH', [MotionType.StethRewardProgramAdd]: 'Add stETH reward program', [MotionType.StethRewardProgramRemove]: 'Remove stETH reward program', [MotionType.StethRewardProgramTopUp]: 'Top up stETH reward programs', @@ -25,6 +23,8 @@ export const MotionTypeDisplayNames: Record< // next motion types are retired // we are keeping them here to display history data + [MotionType.LEGOTopUp]: 'Top up LEGO', + [MotionType.GasFunderETHTopUp]: 'Top up Gas Funder ETH', [MotionType.RewardProgramAdd]: 'Add reward program', [MotionType.RewardProgramRemove]: 'Remove reward program', [MotionType.RewardProgramTopUp]: 'Top up reward program', diff --git a/modules/motions/utils/index.ts b/modules/motions/utils/index.ts index a1130a20..22507bcc 100644 --- a/modules/motions/utils/index.ts +++ b/modules/motions/utils/index.ts @@ -2,7 +2,6 @@ export * from './checkInputsGreaterThanLimit' export * from './estimateGasFallback' export * from './formatMotionDataOnchain' export * from './formatMotionDataSubgraph' -export * from './getContractMethodParams' export * from './getEventMotionCanceled' export * from './getEventMotionCreation' export * from './getEventsAllowedRecipientAdded' diff --git a/pages/_app.tsx b/pages/_app.tsx index 1547b99e..f04acaba 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -93,7 +93,8 @@ function AppRoot({ Component, pageProps }: AppProps) { ))} </Head> <PageLayout> - {!isUnsupported ? <Component {...pageProps} /> : <NetworkSwitcher />} + {isUnsupported && <NetworkSwitcher />} + <Component {...pageProps} /> </PageLayout> <ToastContainer /> </>