diff --git a/src/helpers/validators.ts b/src/helpers/validators.ts index 39189567be8..c2c5fce0942 100644 --- a/src/helpers/validators.ts +++ b/src/helpers/validators.ts @@ -33,8 +33,7 @@ export const isENSAddressFormat = memoFn(address => { return true; }); -export const isUnstoppableAddressFormat = memoFn(address => { - // @ts-expect-error ts-migrate(2571) FIXME: Object is of type 'unknown'. +export const isUnstoppableAddressFormat = memoFn((address: string) => { const parts = !!address && address.split('.'); if ( !parts || @@ -89,7 +88,7 @@ export const checkIsValidAddressOrDomain = async (address: any) => { * @param {String} ENS, or Unstoppable * @return {Boolean} */ -export const isValidDomainFormat = memoFn(domain => { +export const isValidDomainFormat = memoFn((domain: string) => { return isUnstoppableAddressFormat(domain) || isENSAddressFormat(domain); }); /** diff --git a/src/screens/SendSheet.tsx b/src/screens/SendSheet.tsx index 93f64e987dc..4a756761ee0 100644 --- a/src/screens/SendSheet.tsx +++ b/src/screens/SendSheet.tsx @@ -837,11 +837,12 @@ export default function SendSheet() { if ( selected && !!accountAddress && - Object.entries(selected || {}).length && assetChainId === currentChainId && currentProviderChainId === currentChainId && + toAddress && isValidAddress && - !isEmpty(selected) + !isEmpty(selected) && + (isUniqueAsset || Number(amountDetails.assetAmount) >= 0) ) { estimateGasLimit( { @@ -879,6 +880,7 @@ export default function SendSheet() { chainId, isNft, currentChainId, + isUniqueAsset, ]); const sendContactListDataKey = useMemo(() => `${ensSuggestions?.[0]?.address || '_'}`, [ensSuggestions]);