mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Updating util import paths for master
This commit is contained in:
parent
03961715f7
commit
947cf9eb1f
@ -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'),
|
||||
}));
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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 = {
|
||||
|
@ -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 = {
|
||||
|
@ -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) => {
|
||||
|
@ -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';
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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 = {
|
||||
|
@ -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;
|
||||
|
@ -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)),
|
||||
),
|
||||
|
@ -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,
|
||||
|
@ -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 = {
|
||||
|
@ -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 = {
|
||||
|
@ -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) => {
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user