Skip to content

Commit

Permalink
fix some typescript bs
Browse files Browse the repository at this point in the history
  • Loading branch information
walmat committed Oct 1, 2024
1 parent 2968e6f commit 9ec7b98
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/helpers/validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
Expand Down Expand Up @@ -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);
});
/**
Expand Down
6 changes: 4 additions & 2 deletions src/screens/SendSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
{
Expand Down Expand Up @@ -879,6 +880,7 @@ export default function SendSheet() {
chainId,
isNft,
currentChainId,
isUniqueAsset,
]);

const sendContactListDataKey = useMemo(() => `${ensSuggestions?.[0]?.address || '_'}`, [ensSuggestions]);
Expand Down

0 comments on commit 9ec7b98

Please sign in to comment.