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 { shallow } from 'enzyme';
|
||||||
import sinon from 'sinon';
|
import sinon from 'sinon';
|
||||||
import Identicon from '../../ui/identicon';
|
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';
|
import AccountListItem from './account-list-item';
|
||||||
|
|
||||||
jest.mock('../../../../shared/modules/hexstring-utils', () => ({
|
jest.mock('../../../../../shared/modules/hexstring-utils', () => ({
|
||||||
toChecksumHexAddress: jest.fn(() => 'mockCheckSumAddress'),
|
toChecksumHexAddress: jest.fn(() => 'mockCheckSumAddress'),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import Identicon from '../../ui/identicon';
|
import Identicon from '../../ui/identicon';
|
||||||
import AccountMismatchWarning from '../../ui/account-mismatch-warning/account-mismatch-warning.component';
|
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({
|
export default function AccountListItem({
|
||||||
account,
|
account,
|
||||||
|
@ -7,7 +7,7 @@ import copyToClipboard from 'copy-to-clipboard';
|
|||||||
import ReadOnlyInput from '../../../ui/readonly-input';
|
import ReadOnlyInput from '../../../ui/readonly-input';
|
||||||
import Button from '../../../ui/button';
|
import Button from '../../../ui/button';
|
||||||
import AccountModalContainer from '../account-modal-container';
|
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 {
|
export default class ExportPrivateKeyModal extends Component {
|
||||||
static contextTypes = {
|
static contextTypes = {
|
||||||
|
@ -4,7 +4,7 @@ import copyToClipboard from 'copy-to-clipboard';
|
|||||||
import { shortenAddress } from '../../../helpers/utils/util';
|
import { shortenAddress } from '../../../helpers/utils/util';
|
||||||
|
|
||||||
import Tooltip from '../../ui/tooltip';
|
import Tooltip from '../../ui/tooltip';
|
||||||
import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils';
|
import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils';
|
||||||
|
|
||||||
class SelectedAccount extends Component {
|
class SelectedAccount extends Component {
|
||||||
state = {
|
state = {
|
||||||
|
@ -4,7 +4,7 @@ import {
|
|||||||
getAddressBook,
|
getAddressBook,
|
||||||
getRpcPrefsForCurrentProvider,
|
getRpcPrefsForCurrentProvider,
|
||||||
} from '../../../selectors';
|
} from '../../../selectors';
|
||||||
import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils';
|
import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils';
|
||||||
import TransactionListItemDetails from './transaction-list-item-details.component';
|
import TransactionListItemDetails from './transaction-list-item-details.component';
|
||||||
|
|
||||||
const mapStateToProps = (state, ownProps) => {
|
const mapStateToProps = (state, ownProps) => {
|
||||||
|
@ -2,7 +2,7 @@ import React, { PureComponent } from 'react';
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import contractMap from '@metamask/contract-metadata';
|
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 Jazzicon from '../jazzicon';
|
||||||
import BlockieIdenticon from './blockieIdenticon';
|
import BlockieIdenticon from './blockieIdenticon';
|
||||||
|
@ -4,7 +4,7 @@ import qrCode from 'qrcode-generator';
|
|||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { isHexPrefixed } from 'ethereumjs-util';
|
import { isHexPrefixed } from 'ethereumjs-util';
|
||||||
import ReadOnlyInput from '../readonly-input/readonly-input';
|
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);
|
export default connect(mapStateToProps)(QrCodeView);
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import Identicon from '../identicon';
|
|||||||
import { shortenAddress } from '../../../helpers/utils/util';
|
import { shortenAddress } from '../../../helpers/utils/util';
|
||||||
import AccountMismatchWarning from '../account-mismatch-warning/account-mismatch-warning.component';
|
import AccountMismatchWarning from '../account-mismatch-warning/account-mismatch-warning.component';
|
||||||
import { useI18nContext } from '../../../hooks/useI18nContext';
|
import { useI18nContext } from '../../../hooks/useI18nContext';
|
||||||
import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils';
|
import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils';
|
||||||
import {
|
import {
|
||||||
DEFAULT_VARIANT,
|
DEFAULT_VARIANT,
|
||||||
CARDS_VARIANT,
|
CARDS_VARIANT,
|
||||||
|
@ -11,7 +11,7 @@ import Confusable from '../../../../components/ui/confusable';
|
|||||||
import {
|
import {
|
||||||
isBurnAddress,
|
isBurnAddress,
|
||||||
isValidHexAddress,
|
isValidHexAddress,
|
||||||
} from '../../../../../shared/modules/hexstring-utils';
|
} from '../../../../../../shared/modules/hexstring-utils';
|
||||||
|
|
||||||
export default class AddRecipient extends Component {
|
export default class AddRecipient extends Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
|
@ -19,7 +19,7 @@ import {
|
|||||||
isBurnAddress,
|
isBurnAddress,
|
||||||
isValidHexAddress,
|
isValidHexAddress,
|
||||||
toChecksumHexAddress,
|
toChecksumHexAddress,
|
||||||
} from '../../../../../shared/modules/hexstring-utils';
|
} from '../../../../../../shared/modules/hexstring-utils';
|
||||||
|
|
||||||
export function getToErrorObject(to, sendTokenAddress, chainId) {
|
export function getToErrorObject(to, sendTokenAddress, chainId) {
|
||||||
let toError = null;
|
let toError = null;
|
||||||
|
@ -18,7 +18,7 @@ jest.mock('../../../../../app/helpers/utils/util', () => ({
|
|||||||
).isOriginContractAddress,
|
).isOriginContractAddress,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
jest.mock('../../../../../shared/modules/hexstring-utils', () => ({
|
jest.mock('../../../../../../shared/modules/hexstring-utils', () => ({
|
||||||
isValidHexAddress: jest.fn((to) =>
|
isValidHexAddress: jest.fn((to) =>
|
||||||
Boolean(to.match(/^[0xabcdef123456798]+$/u)),
|
Boolean(to.match(/^[0xabcdef123456798]+$/u)),
|
||||||
),
|
),
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { debounce } from 'lodash';
|
import { debounce } from 'lodash';
|
||||||
import { isValidHexAddress } from '../../../shared/modules/hexstring-utils';
|
import { isValidHexAddress } from '../../../../shared/modules/hexstring-utils';
|
||||||
import {
|
import {
|
||||||
getAmountErrorObject,
|
getAmountErrorObject,
|
||||||
getGasFeeErrorObject,
|
getGasFeeErrorObject,
|
||||||
|
@ -10,7 +10,7 @@ import PageContainerFooter from '../../../../components/ui/page-container/page-c
|
|||||||
import {
|
import {
|
||||||
isBurnAddress,
|
isBurnAddress,
|
||||||
isValidHexAddress,
|
isValidHexAddress,
|
||||||
} from '../../../../../shared/modules/hexstring-utils';
|
} from '../../../../../../shared/modules/hexstring-utils';
|
||||||
|
|
||||||
export default class AddContact extends PureComponent {
|
export default class AddContact extends PureComponent {
|
||||||
static contextTypes = {
|
static contextTypes = {
|
||||||
|
@ -8,7 +8,7 @@ import PageContainerFooter from '../../../../components/ui/page-container/page-c
|
|||||||
import {
|
import {
|
||||||
isBurnAddress,
|
isBurnAddress,
|
||||||
isValidHexAddress,
|
isValidHexAddress,
|
||||||
} from '../../../../../shared/modules/hexstring-utils';
|
} from '../../../../../../shared/modules/hexstring-utils';
|
||||||
|
|
||||||
export default class EditContact extends PureComponent {
|
export default class EditContact extends PureComponent {
|
||||||
static contextTypes = {
|
static contextTypes = {
|
||||||
|
@ -6,7 +6,7 @@ import {
|
|||||||
CONTACT_EDIT_ROUTE,
|
CONTACT_EDIT_ROUTE,
|
||||||
CONTACT_LIST_ROUTE,
|
CONTACT_LIST_ROUTE,
|
||||||
} from '../../../../helpers/constants/routes';
|
} from '../../../../helpers/constants/routes';
|
||||||
import { toChecksumHexAddress } from '../../../../../shared/modules/hexstring-utils';
|
import { toChecksumHexAddress } from '../../../../../../shared/modules/hexstring-utils';
|
||||||
import ViewContact from './view-contact.component';
|
import ViewContact from './view-contact.component';
|
||||||
|
|
||||||
const mapStateToProps = (state, ownProps) => {
|
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 fetchWithCache from '../../helpers/utils/fetch-with-cache';
|
||||||
|
|
||||||
import { calcGasTotal } from '../send/send.utils';
|
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 =
|
const TOKEN_TRANSFER_LOG_TOPIC_HASH =
|
||||||
'0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef';
|
'0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef';
|
||||||
|
@ -21,7 +21,7 @@ import {
|
|||||||
|
|
||||||
import { TEMPLATED_CONFIRMATION_MESSAGE_TYPES } from '../pages/confirmation/templates';
|
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';
|
import { getNativeCurrency } from './send';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user