From 9a8254deb6347cd69fc1d40447a9265091a6298b Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Tue, 11 May 2021 16:53:50 -0230 Subject: [PATCH] Use isValidAddress helper instead of ethereumJsUtil.isValidAddress, when appropriate (#11049) --- ui/app/pages/add-token/add-token.component.js | 6 ++++-- ui/app/pages/send/send.component.js | 2 +- ui/lib/icon-factory.js | 3 +-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ui/app/pages/add-token/add-token.component.js b/ui/app/pages/add-token/add-token.component.js index c2c9e9fa3..664a368e6 100644 --- a/ui/app/pages/add-token/add-token.component.js +++ b/ui/app/pages/add-token/add-token.component.js @@ -1,7 +1,9 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import { isValidAddress } from 'ethereumjs-util'; -import { checkExistingAddresses } from '../../helpers/utils/util'; +import { + checkExistingAddresses, + isValidAddress, +} from '../../helpers/utils/util'; import { tokenInfoGetter } from '../../helpers/utils/token-util'; import { CONFIRM_ADD_TOKEN_ROUTE } from '../../helpers/constants/routes'; import TextField from '../../components/ui/text-field'; diff --git a/ui/app/pages/send/send.component.js b/ui/app/pages/send/send.component.js index 478460aef..56eafb1e7 100644 --- a/ui/app/pages/send/send.component.js +++ b/ui/app/pages/send/send.component.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import { isValidAddress } from 'ethereumjs-util'; import { debounce } from 'lodash'; +import { isValidAddress } from '../../helpers/utils/util'; import { getAmountErrorObject, getGasFeeErrorObject, diff --git a/ui/lib/icon-factory.js b/ui/lib/icon-factory.js index ca254317b..c72f5dfd9 100644 --- a/ui/lib/icon-factory.js +++ b/ui/lib/icon-factory.js @@ -1,6 +1,5 @@ -import { isValidAddress } from 'ethereumjs-util'; import contractMap from '@metamask/contract-metadata'; -import { checksumAddress } from '../app/helpers/utils/util'; +import { isValidAddress, checksumAddress } from '../app/helpers/utils/util'; let iconFactory;