diff --git a/src/containers/EvmCrossChainRecoveryWallet/ColdWalletForm.tsx b/src/containers/EvmCrossChainRecoveryWallet/ColdWalletForm.tsx index fecfb5fd..43452d97 100644 --- a/src/containers/EvmCrossChainRecoveryWallet/ColdWalletForm.tsx +++ b/src/containers/EvmCrossChainRecoveryWallet/ColdWalletForm.tsx @@ -9,10 +9,9 @@ const validationSchema = Yup.object({ gasLimit: Yup.number() .typeError('Gas limit must be a number') .integer() - .positive('Gas limit must be a positive integer') - .required(), - maxFeePerGas: Yup.number().required(), - maxPriorityFeePerGas: Yup.number().required(), + .positive('Gas limit must be a positive integer'), + maxFeePerGas: Yup.number(), + maxPriorityFeePerGas: Yup.number(), recoveryDestination: Yup.string().required(), userKey: Yup.string().required(), userKeyId: Yup.string(), @@ -21,7 +20,7 @@ const validationSchema = Yup.object({ apiKey: Yup.string().required(), wrongChain: Yup.string().required(), intendedChain: Yup.string().required(), - gasPrice: Yup.number().required(), + gasPrice: Yup.number(), }).required(); export type FormProps = { @@ -38,9 +37,9 @@ export function ColdWalletForm({ onSubmit }: FormProps) { onSubmit, initialValues: { bitgoFeeAddress: '', - gasLimit: 500000, - maxFeePerGas: 500, - maxPriorityFeePerGas: 50, + gasLimit: undefined, + maxFeePerGas: undefined, + maxPriorityFeePerGas: undefined, recoveryDestination: '', userKey: '', userKeyId: '', @@ -49,7 +48,7 @@ export function ColdWalletForm({ onSubmit }: FormProps) { apiKey: '', wrongChain: '', intendedChain: '', - gasPrice: 20, + gasPrice: undefined, }, validationSchema, }); diff --git a/src/containers/EvmCrossChainRecoveryWallet/EvmCrossChainRecoveryBaseForm.tsx b/src/containers/EvmCrossChainRecoveryWallet/EvmCrossChainRecoveryBaseForm.tsx index 73946fa8..9f5ace01 100644 --- a/src/containers/EvmCrossChainRecoveryWallet/EvmCrossChainRecoveryBaseForm.tsx +++ b/src/containers/EvmCrossChainRecoveryWallet/EvmCrossChainRecoveryBaseForm.tsx @@ -23,9 +23,6 @@ export function EvmCrossChainRecoveryBaseForm({ const [intendedChainCoins, setIntendedChainCoins] = useState< readonly CoinMetadata[] >([]); - const [gasLimit, setGasLimit] = useState(500000); - const [maxFeePerGas, setMaxFeePerGas] = useState(500); - const [maxPriorityFeePerGas, setMaxPriorityFeePerGas] = useState(50); const { env } = useParams<'env'>(); const { wallet } = useParams<'wallet'>(); const isCustodyWallet = wallet === allWalletMetas.custody.value; @@ -53,11 +50,6 @@ export function EvmCrossChainRecoveryBaseForm({ setDisabled(false); const intendedChainCoins = evmCCRIntendedChainCoins[wrongChainName]; setIntendedChainCoins(intendedChainCoins); - setGasLimit(allCoinMetas[wrongChainName]?.defaultGasLimitNum ?? 500000); - setMaxFeePerGas(allCoinMetas[wrongChainName]?.defaultMaxFeePerGas ?? 500); - setMaxPriorityFeePerGas( - allCoinMetas[wrongChainName]?.defaultMaxPriorityFeePerGas ?? 50 - ); }; const getIntendedChainCoins = () => { @@ -132,8 +124,8 @@ export function EvmCrossChainRecoveryBaseForm({ {!isCustodyWallet && (