From 947cf9eb1ffdbeca55dc99ad15310fe2692a8742 Mon Sep 17 00:00:00 2001 From: ryanml Date: Mon, 17 May 2021 15:53:41 -0700 Subject: [PATCH] Updating util import paths for master --- .../app/account-list-item/account-list-item-component.test.js | 4 ++-- ui/app/components/app/account-list-item/account-list-item.js | 2 +- .../export-private-key-modal.component.js | 2 +- .../app/selected-account/selected-account.component.js | 2 +- .../transaction-list-item-details.container.js | 2 +- ui/app/components/ui/identicon/identicon.component.js | 2 +- ui/app/components/ui/qr-code/qr-code.js | 2 +- .../ui/sender-to-recipient/sender-to-recipient.component.js | 2 +- .../send-content/add-recipient/add-recipient.component.js | 2 +- ui/app/pages/send/send-content/add-recipient/add-recipient.js | 2 +- .../send-content/add-recipient/add-recipient.utils.test.js | 2 +- ui/app/pages/send/send.component.js | 2 +- .../contact-list-tab/add-contact/add-contact.component.js | 2 +- .../contact-list-tab/edit-contact/edit-contact.component.js | 2 +- .../contact-list-tab/view-contact/view-contact.container.js | 2 +- ui/app/pages/swaps/swaps.util.js | 2 +- ui/app/selectors/selectors.js | 2 +- 17 files changed, 18 insertions(+), 18 deletions(-) diff --git a/ui/app/components/app/account-list-item/account-list-item-component.test.js b/ui/app/components/app/account-list-item/account-list-item-component.test.js index d8a05ce46..03c038cf4 100644 --- a/ui/app/components/app/account-list-item/account-list-item-component.test.js +++ b/ui/app/components/app/account-list-item/account-list-item-component.test.js @@ -2,10 +2,10 @@ import React from 'react'; import { shallow } from 'enzyme'; import sinon from 'sinon'; import Identicon from '../../ui/identicon'; -import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils'; import AccountListItem from './account-list-item'; -jest.mock('../../../../shared/modules/hexstring-utils', () => ({ +jest.mock('../../../../../shared/modules/hexstring-utils', () => ({ toChecksumHexAddress: jest.fn(() => 'mockCheckSumAddress'), })); diff --git a/ui/app/components/app/account-list-item/account-list-item.js b/ui/app/components/app/account-list-item/account-list-item.js index 5220dede9..fd1b80bc4 100644 --- a/ui/app/components/app/account-list-item/account-list-item.js +++ b/ui/app/components/app/account-list-item/account-list-item.js @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import Identicon from '../../ui/identicon'; import AccountMismatchWarning from '../../ui/account-mismatch-warning/account-mismatch-warning.component'; -import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils'; export default function AccountListItem({ account, diff --git a/ui/app/components/app/modals/export-private-key-modal/export-private-key-modal.component.js b/ui/app/components/app/modals/export-private-key-modal/export-private-key-modal.component.js index ba6e4ca8b..4db92c4f5 100644 --- a/ui/app/components/app/modals/export-private-key-modal/export-private-key-modal.component.js +++ b/ui/app/components/app/modals/export-private-key-modal/export-private-key-modal.component.js @@ -7,7 +7,7 @@ import copyToClipboard from 'copy-to-clipboard'; import ReadOnlyInput from '../../../ui/readonly-input'; import Button from '../../../ui/button'; import AccountModalContainer from '../account-modal-container'; -import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../../../../../shared/modules/hexstring-utils'; export default class ExportPrivateKeyModal extends Component { static contextTypes = { diff --git a/ui/app/components/app/selected-account/selected-account.component.js b/ui/app/components/app/selected-account/selected-account.component.js index b52dd033f..40d8c2a4e 100644 --- a/ui/app/components/app/selected-account/selected-account.component.js +++ b/ui/app/components/app/selected-account/selected-account.component.js @@ -4,7 +4,7 @@ import copyToClipboard from 'copy-to-clipboard'; import { shortenAddress } from '../../../helpers/utils/util'; import Tooltip from '../../ui/tooltip'; -import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils'; class SelectedAccount extends Component { state = { diff --git a/ui/app/components/app/transaction-list-item-details/transaction-list-item-details.container.js b/ui/app/components/app/transaction-list-item-details/transaction-list-item-details.container.js index 280cec020..f1cbf6237 100644 --- a/ui/app/components/app/transaction-list-item-details/transaction-list-item-details.container.js +++ b/ui/app/components/app/transaction-list-item-details/transaction-list-item-details.container.js @@ -4,7 +4,7 @@ import { getAddressBook, getRpcPrefsForCurrentProvider, } from '../../../selectors'; -import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils'; import TransactionListItemDetails from './transaction-list-item-details.component'; const mapStateToProps = (state, ownProps) => { diff --git a/ui/app/components/ui/identicon/identicon.component.js b/ui/app/components/ui/identicon/identicon.component.js index dd6eb5beb..64a03ea01 100644 --- a/ui/app/components/ui/identicon/identicon.component.js +++ b/ui/app/components/ui/identicon/identicon.component.js @@ -2,7 +2,7 @@ import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import contractMap from '@metamask/contract-metadata'; -import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils'; import Jazzicon from '../jazzicon'; import BlockieIdenticon from './blockieIdenticon'; diff --git a/ui/app/components/ui/qr-code/qr-code.js b/ui/app/components/ui/qr-code/qr-code.js index db0eeed2c..ae43dc49b 100644 --- a/ui/app/components/ui/qr-code/qr-code.js +++ b/ui/app/components/ui/qr-code/qr-code.js @@ -4,7 +4,7 @@ import qrCode from 'qrcode-generator'; import { connect } from 'react-redux'; import { isHexPrefixed } from 'ethereumjs-util'; import ReadOnlyInput from '../readonly-input/readonly-input'; -import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils'; export default connect(mapStateToProps)(QrCodeView); diff --git a/ui/app/components/ui/sender-to-recipient/sender-to-recipient.component.js b/ui/app/components/ui/sender-to-recipient/sender-to-recipient.component.js index 30e42e46f..69db31e1d 100644 --- a/ui/app/components/ui/sender-to-recipient/sender-to-recipient.component.js +++ b/ui/app/components/ui/sender-to-recipient/sender-to-recipient.component.js @@ -7,7 +7,7 @@ import Identicon from '../identicon'; import { shortenAddress } from '../../../helpers/utils/util'; import AccountMismatchWarning from '../account-mismatch-warning/account-mismatch-warning.component'; import { useI18nContext } from '../../../hooks/useI18nContext'; -import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils'; import { DEFAULT_VARIANT, CARDS_VARIANT, diff --git a/ui/app/pages/send/send-content/add-recipient/add-recipient.component.js b/ui/app/pages/send/send-content/add-recipient/add-recipient.component.js index da7999c94..a7afd2141 100644 --- a/ui/app/pages/send/send-content/add-recipient/add-recipient.component.js +++ b/ui/app/pages/send/send-content/add-recipient/add-recipient.component.js @@ -11,7 +11,7 @@ import Confusable from '../../../../components/ui/confusable'; import { isBurnAddress, isValidHexAddress, -} from '../../../../../shared/modules/hexstring-utils'; +} from '../../../../../../shared/modules/hexstring-utils'; export default class AddRecipient extends Component { static propTypes = { diff --git a/ui/app/pages/send/send-content/add-recipient/add-recipient.js b/ui/app/pages/send/send-content/add-recipient/add-recipient.js index 5141fda1d..3124ccdb5 100644 --- a/ui/app/pages/send/send-content/add-recipient/add-recipient.js +++ b/ui/app/pages/send/send-content/add-recipient/add-recipient.js @@ -19,7 +19,7 @@ import { isBurnAddress, isValidHexAddress, toChecksumHexAddress, -} from '../../../../../shared/modules/hexstring-utils'; +} from '../../../../../../shared/modules/hexstring-utils'; export function getToErrorObject(to, sendTokenAddress, chainId) { let toError = null; diff --git a/ui/app/pages/send/send-content/add-recipient/add-recipient.utils.test.js b/ui/app/pages/send/send-content/add-recipient/add-recipient.utils.test.js index 6f7688fa0..33f70b876 100644 --- a/ui/app/pages/send/send-content/add-recipient/add-recipient.utils.test.js +++ b/ui/app/pages/send/send-content/add-recipient/add-recipient.utils.test.js @@ -18,7 +18,7 @@ jest.mock('../../../../../app/helpers/utils/util', () => ({ ).isOriginContractAddress, })); -jest.mock('../../../../../shared/modules/hexstring-utils', () => ({ +jest.mock('../../../../../../shared/modules/hexstring-utils', () => ({ isValidHexAddress: jest.fn((to) => Boolean(to.match(/^[0xabcdef123456798]+$/u)), ), diff --git a/ui/app/pages/send/send.component.js b/ui/app/pages/send/send.component.js index 6954f9cfc..24bd3dc7a 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 { debounce } from 'lodash'; -import { isValidHexAddress } from '../../../shared/modules/hexstring-utils'; +import { isValidHexAddress } from '../../../../shared/modules/hexstring-utils'; import { getAmountErrorObject, getGasFeeErrorObject, diff --git a/ui/app/pages/settings/contact-list-tab/add-contact/add-contact.component.js b/ui/app/pages/settings/contact-list-tab/add-contact/add-contact.component.js index f017604fd..8ddd29ac2 100644 --- a/ui/app/pages/settings/contact-list-tab/add-contact/add-contact.component.js +++ b/ui/app/pages/settings/contact-list-tab/add-contact/add-contact.component.js @@ -10,7 +10,7 @@ import PageContainerFooter from '../../../../components/ui/page-container/page-c import { isBurnAddress, isValidHexAddress, -} from '../../../../../shared/modules/hexstring-utils'; +} from '../../../../../../shared/modules/hexstring-utils'; export default class AddContact extends PureComponent { static contextTypes = { diff --git a/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js b/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js index 51419b302..00725f6ea 100644 --- a/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js +++ b/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js @@ -8,7 +8,7 @@ import PageContainerFooter from '../../../../components/ui/page-container/page-c import { isBurnAddress, isValidHexAddress, -} from '../../../../../shared/modules/hexstring-utils'; +} from '../../../../../../shared/modules/hexstring-utils'; export default class EditContact extends PureComponent { static contextTypes = { diff --git a/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.container.js b/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.container.js index 275273d0a..2ce020ffa 100644 --- a/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.container.js +++ b/ui/app/pages/settings/contact-list-tab/view-contact/view-contact.container.js @@ -6,7 +6,7 @@ import { CONTACT_EDIT_ROUTE, CONTACT_LIST_ROUTE, } from '../../../../helpers/constants/routes'; -import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../../../../../shared/modules/hexstring-utils'; import ViewContact from './view-contact.component'; const mapStateToProps = (state, ownProps) => { diff --git a/ui/app/pages/swaps/swaps.util.js b/ui/app/pages/swaps/swaps.util.js index 42b1d0b9e..968802bb3 100644 --- a/ui/app/pages/swaps/swaps.util.js +++ b/ui/app/pages/swaps/swaps.util.js @@ -34,7 +34,7 @@ import { formatCurrency } from '../../helpers/utils/confirm-tx.util'; import fetchWithCache from '../../helpers/utils/fetch-with-cache'; import { calcGasTotal } from '../send/send.utils'; -import { isValidHexAddress } from '../../../shared/modules/hexstring-utils'; +import { isValidHexAddress } from '../../../../shared/modules/hexstring-utils'; const TOKEN_TRANSFER_LOG_TOPIC_HASH = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'; diff --git a/ui/app/selectors/selectors.js b/ui/app/selectors/selectors.js index e5de40dae..eed91f858 100644 --- a/ui/app/selectors/selectors.js +++ b/ui/app/selectors/selectors.js @@ -21,7 +21,7 @@ import { import { TEMPLATED_CONFIRMATION_MESSAGE_TYPES } from '../pages/confirmation/templates'; -import { toChecksumHexAddress } from '../../shared/modules/hexstring-utils'; +import { toChecksumHexAddress } from '../../../shared/modules/hexstring-utils'; import { getNativeCurrency } from './send'; /**