diff options
author | Hsuan Lee <hsuan@cobinhood.com> | 2018-12-11 18:00:37 +0800 |
---|---|---|
committer | Hsuan Lee <hsuan@cobinhood.com> | 2018-12-11 18:03:36 +0800 |
commit | 5d23feae8d213bd234044955c68abbce106d02e9 (patch) | |
tree | de3c070269a2e6518285b59ef5386fcba004d924 /ui | |
parent | 0862bb63a551e380a9ce4fc3a69b42d37fa66aa9 (diff) | |
download | dexon-wallet-5d23feae8d213bd234044955c68abbce106d02e9.tar.gz dexon-wallet-5d23feae8d213bd234044955c68abbce106d02e9.tar.zst dexon-wallet-5d23feae8d213bd234044955c68abbce106d02e9.zip |
Refine wording
Diffstat (limited to 'ui')
33 files changed, 73 insertions, 60 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index cca44d03..1aa9e00a 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -1925,7 +1925,7 @@ function updateProviderType (type) { } } -function setRpcTarget (newRpc, chainId, ticker = 'DEX', nickname = '') { +function setRpcTarget (newRpc, chainId, ticker = 'DXN', nickname = '') { return (dispatch) => { log.debug(`background.setRpcTarget: ${newRpc} ${chainId} ${ticker} ${nickname}`) background.setCustomRpc(newRpc, chainId, ticker, nickname, (err, result) => { diff --git a/ui/app/components/currency-display/currency-display.component.js b/ui/app/components/currency-display/currency-display.component.js index fc37fd66..b31645a3 100644 --- a/ui/app/components/currency-display/currency-display.component.js +++ b/ui/app/components/currency-display/currency-display.component.js @@ -1,7 +1,7 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' -import { ETH, DEX, GWEI } from '../../constants/common' +import { ETH, DXN, GWEI } from '../../constants/common' export default class CurrencyDisplay extends PureComponent { static propTypes = { @@ -12,7 +12,7 @@ export default class CurrencyDisplay extends PureComponent { style: PropTypes.object, suffix: PropTypes.string, // Used in container - currency: PropTypes.oneOf([ETH, DEX]), + currency: PropTypes.oneOf([ETH, DXN]), denomination: PropTypes.oneOf([GWEI]), value: PropTypes.string, numberOfDecimals: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), diff --git a/ui/app/components/currency-display/tests/currency-display.container.test.js b/ui/app/components/currency-display/tests/currency-display.container.test.js index 59cb8e72..5124b401 100644 --- a/ui/app/components/currency-display/tests/currency-display.container.test.js +++ b/ui/app/components/currency-display/tests/currency-display.container.test.js @@ -69,18 +69,18 @@ describe('CurrencyDisplay container', () => { { props: { value: '0x1193461d01595930', - currency: 'DEX', + currency: 'DXN', numberOfDecimals: 3, }, result: { displayValue: '1.266', - suffix: 'DEX', + suffix: 'DXN', }, }, { props: { value: '0x1193461d01595930', - currency: 'DEX', + currency: 'DXN', numberOfDecimals: 3, hideLabel: true, }, @@ -93,7 +93,7 @@ describe('CurrencyDisplay container', () => { { props: { value: '0x3b9aca00', - currency: 'DEX', + currency: 'DXN', denomination: 'GWEI', hideLabel: true, }, @@ -106,7 +106,7 @@ describe('CurrencyDisplay container', () => { { props: { value: '0x3b9aca00', - currency: 'DEX', + currency: 'DXN', denomination: 'WEI', hideLabel: true, }, @@ -119,7 +119,7 @@ describe('CurrencyDisplay container', () => { { props: { value: '0x3b9aca00', - currency: 'DEX', + currency: 'DXN', numberOfDecimals: 100, hideLabel: true, }, diff --git a/ui/app/components/currency-input/currency-input.component.js b/ui/app/components/currency-input/currency-input.component.js index 8a12851d..3f441fcc 100644 --- a/ui/app/components/currency-input/currency-input.component.js +++ b/ui/app/components/currency-input/currency-input.component.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types' import UnitInput from '../unit-input' import CurrencyDisplay from '../currency-display' import { getValueFromWeiHex, getWeiHexFromDecimalValue } from '../../helpers/conversions.util' -import { DEX } from '../../constants/common' +import { DXN } from '../../constants/common' /** * Component that allows user to enter currency values as a number, and props receive a converted @@ -52,7 +52,7 @@ export default class CurrencyInput extends PureComponent { value: hexValue, toCurrency: currentCurrency, conversionRate, numberOfDecimals: 2, }) : getValueFromWeiHex({ - value: hexValue, toCurrency: DEX, numberOfDecimals: 6, + value: hexValue, toCurrency: DXN, numberOfDecimals: 6, }) return Number(decimalValueString) || 0 @@ -66,7 +66,7 @@ export default class CurrencyInput extends PureComponent { value: decimalValue, fromCurrency, conversionRate, invertConversionRate: true, }) : getWeiHexFromDecimalValue({ - value: decimalValue, fromCurrency: DEX, fromDenomination: DEX, conversionRate, + value: decimalValue, fromCurrency: DXN, fromDenomination: DXN, conversionRate, }) this.setState({ hexValue, decimalValue }) @@ -84,7 +84,7 @@ export default class CurrencyInput extends PureComponent { if (useFiat) { // Display DEX - currency = DEX + currency = DXN numberOfDecimals = 6 } else { // Display Fiat diff --git a/ui/app/components/currency-input/currency-input.container.js b/ui/app/components/currency-input/currency-input.container.js index a5d40730..84d06b6f 100644 --- a/ui/app/components/currency-input/currency-input.container.js +++ b/ui/app/components/currency-input/currency-input.container.js @@ -1,6 +1,6 @@ import { connect } from 'react-redux' import CurrencyInput from './currency-input.component' -import { DEX } from '../../constants/common' +import { DXN } from '../../constants/common' const mapStateToProps = state => { const { dekusan: { nativeCurrency, currentCurrency, conversionRate } } = state @@ -15,7 +15,7 @@ const mapStateToProps = state => { const mergeProps = (stateProps, dispatchProps, ownProps) => { const { currentCurrency } = stateProps const { useFiat } = ownProps - const suffix = useFiat ? currentCurrency.toUpperCase() : DEX + const suffix = useFiat ? currentCurrency.toUpperCase() : DXN return { ...stateProps, diff --git a/ui/app/components/currency-input/tests/currency-input.container.test.js b/ui/app/components/currency-input/tests/currency-input.container.test.js index feb5a8eb..52a328b6 100644 --- a/ui/app/components/currency-input/tests/currency-input.container.test.js +++ b/ui/app/components/currency-input/tests/currency-input.container.test.js @@ -52,8 +52,8 @@ describe('CurrencyInput container', () => { assert.deepEqual(mergeProps(mockStateProps, mockDispatchProps, {}), { conversionRate: 280.45, currentCurrency: 'usd', - nativeCurrency: 'DEX', - suffix: 'DEX', + nativeCurrency: 'DXN', + suffix: 'DXN', }) }) }) diff --git a/ui/app/components/dropdowns/network-dropdown.js b/ui/app/components/dropdowns/network-dropdown.js index 9110c81f..9190947a 100644 --- a/ui/app/components/dropdowns/network-dropdown.js +++ b/ui/app/components/dropdowns/network-dropdown.js @@ -233,7 +233,7 @@ NetworkDropdown.prototype.renderCommonRpc = function (rpcListDetail, provider) { return reversedRpcListDetail.map((entry) => { const rpc = entry.rpcUrl - const ticker = entry.ticker || 'DEX' + const ticker = entry.ticker || 'DXN' const nickname = entry.nickname || '' const currentRpcTarget = provider.type === 'rpc' && rpc === provider.rpcTarget diff --git a/ui/app/components/modals/deposit-ether-modal.js b/ui/app/components/modals/deposit-ether-modal.js index 5610440c..6f1600c9 100644 --- a/ui/app/components/modals/deposit-ether-modal.js +++ b/ui/app/components/modals/deposit-ether-modal.js @@ -124,7 +124,7 @@ DepositEtherModal.prototype.render = function () { h('div.page-container__header', [ - h('div.page-container__title', [this.context.t('depositDEX')]), + h('div.page-container__title', [this.context.t('depositDXN')]), h('div.page-container__subtitle', [ this.context.t('needDexInWallet'), diff --git a/ui/app/components/page-container/page-container.component.js b/ui/app/components/page-container/page-container.component.js index 45dfff51..7dc9b11a 100644 --- a/ui/app/components/page-container/page-container.component.js +++ b/ui/app/components/page-container/page-container.component.js @@ -60,7 +60,7 @@ export default class PageContainer extends PureComponent { renderActiveTabContent () { const { tabsComponent } = this.props - let { children } = tabsComponent.props + let { children = [] } = tabsComponent.props children = children.filter(child => child) const { activeTabIndex } = this.state diff --git a/ui/app/components/pages/add-token/add-token.component.js b/ui/app/components/pages/add-token/add-token.component.js index bd0a48f3..7b1d0bb2 100644 --- a/ui/app/components/pages/add-token/add-token.component.js +++ b/ui/app/components/pages/add-token/add-token.component.js @@ -304,7 +304,7 @@ class AddToken extends Component { return ( <PageContainer title={this.context.t('addTokens')} - tabsComponent={this.renderTabs()} + contentComponent={this.renderCustomTokenForm()} onSubmit={() => this.handleNext()} disabled={this.hasError() || !this.hasSelected()} onCancel={() => { @@ -313,6 +313,19 @@ class AddToken extends Component { }} /> ) + + // return ( + // <PageContainer + // title={this.context.t('addTokens')} + // tabsComponent={this.renderTabs()} + // onSubmit={() => this.handleNext()} + // disabled={this.hasError() || !this.hasSelected()} + // onCancel={() => { + // clearPendingTokens() + // history.push(DEFAULT_ROUTE) + // }} + // /> + // ) } } diff --git a/ui/app/components/pages/confirm-token-transaction-base/confirm-token-transaction-base.component.js b/ui/app/components/pages/confirm-token-transaction-base/confirm-token-transaction-base.component.js index 05e03a58..0c4db2c2 100644 --- a/ui/app/components/pages/confirm-token-transaction-base/confirm-token-transaction-base.component.js +++ b/ui/app/components/pages/confirm-token-transaction-base/confirm-token-transaction-base.component.js @@ -9,7 +9,7 @@ import { roundExponential, } from '../../../helpers/confirm-transaction/util' import { getWeiHexFromDecimalValue } from '../../../helpers/conversions.util' -import { DEX, PRIMARY } from '../../../constants/common' +import { DXN, PRIMARY } from '../../../constants/common' export default class ConfirmTokenTransactionBase extends Component { static contextTypes = { @@ -45,8 +45,8 @@ export default class ConfirmTokenTransactionBase extends Component { const decimalEthValue = (tokenAmount * contractExchangeRate) || 0 const hexWeiValue = getWeiHexFromDecimalValue({ value: decimalEthValue, - fromCurrency: DEX, - fromDenomination: DEX, + fromCurrency: DXN, + fromDenomination: DXN, }) return typeof contractExchangeRate === 'undefined' diff --git a/ui/app/components/pages/settings/settings-tab/index.scss b/ui/app/components/pages/settings/settings-tab/index.scss index 46553f91..41ee8d19 100644 --- a/ui/app/components/pages/settings/settings-tab/index.scss +++ b/ui/app/components/pages/settings/settings-tab/index.scss @@ -14,7 +14,7 @@ align-self: flex-end; padding: 5px; text-transform: uppercase; - color: $dusty-gray; + color: $white; cursor: pointer; width: 25%; min-width: 80px; diff --git a/ui/app/components/pages/settings/settings-tab/settings-tab.component.js b/ui/app/components/pages/settings/settings-tab/settings-tab.component.js index ceb24c50..ce9ed8d7 100644 --- a/ui/app/components/pages/settings/settings-tab/settings-tab.component.js +++ b/ui/app/components/pages/settings/settings-tab/settings-tab.component.js @@ -228,7 +228,7 @@ export default class SettingsTab extends PureComponent { ) } - validateRpc (newRpc, chainId, ticker = 'DEX', nickname) { + validateRpc (newRpc, chainId, ticker = 'DXN', nickname) { const { setRpcTarget, displayWarning } = this.props if (validUrl.isWebUri(newRpc)) { diff --git a/ui/app/components/send/account-list-item/tests/account-list-item-component.test.js b/ui/app/components/send/account-list-item/tests/account-list-item-component.test.js index 8e241269..496dfa35 100644 --- a/ui/app/components/send/account-list-item/tests/account-list-item-component.test.js +++ b/ui/app/components/send/account-list-item/tests/account-list-item-component.test.js @@ -28,7 +28,7 @@ describe('AccountListItem Component', function () { className={'mockClassName'} conversionRate={4} currentCurrency={'mockCurrentyCurrency'} - nativeCurrency={'DEX'} + nativeCurrency={'DXN'} displayAddress={false} displayBalance={false} handleClick={propsMethodSpies.handleClick} diff --git a/ui/app/components/send/send-header/send-header.selectors.js b/ui/app/components/send/send-header/send-header.selectors.js index 3d5ca404..5bdecdd5 100644 --- a/ui/app/components/send/send-header/send-header.selectors.js +++ b/ui/app/components/send/send-header/send-header.selectors.js @@ -19,7 +19,7 @@ function getTitleKey (state) { } else if (isToken) { return 'sendTokens' } else { - return 'sendDEX' + return 'sendDXN' } } diff --git a/ui/app/components/send/send-header/tests/send-header-selectors.test.js b/ui/app/components/send/send-header/tests/send-header-selectors.test.js index d6d090ae..51c1e13c 100644 --- a/ui/app/components/send/send-header/tests/send-header-selectors.test.js +++ b/ui/app/components/send/send-header/tests/send-header-selectors.test.js @@ -23,7 +23,7 @@ describe('send-header selectors', () => { }) it('should return the correct key when getSendEditingTransactionId is falsy and getSelectedToken is falsy', () => { - assert.equal(getTitleKey({ e: null }), 'sendDEX') + assert.equal(getTitleKey({ e: null }), 'sendDXN') }) }) diff --git a/ui/app/components/send/tests/send-selectors.test.js b/ui/app/components/send/tests/send-selectors.test.js index 89ee1f00..9214eccf 100644 --- a/ui/app/components/send/tests/send-selectors.test.js +++ b/ui/app/components/send/tests/send-selectors.test.js @@ -183,7 +183,7 @@ describe('send selectors', () => { it('should return the ticker symbol of the selected network', () => { assert.equal( getNativeCurrency(mockState), - 'DEX' + 'DXN' ) }) }) diff --git a/ui/app/components/shapeshift-form.js b/ui/app/components/shapeshift-form.js index ab04d98a..562c7219 100644 --- a/ui/app/components/shapeshift-form.js +++ b/ui/app/components/shapeshift-form.js @@ -58,7 +58,7 @@ function ShapeshiftForm () { } ShapeshiftForm.prototype.getCoinPair = function () { - return `${this.state.depositCoin.toUpperCase()}_DEX` + return `${this.state.depositCoin.toUpperCase()}_DXN` } ShapeshiftForm.prototype.componentWillMount = function () { @@ -211,7 +211,7 @@ ShapeshiftForm.prototype.render = function () { this.context.t('receive'), ]), - h('div.shapeshift-form__selector-input', ['DEX']), + h('div.shapeshift-form__selector-input', ['DXN']), ]), diff --git a/ui/app/components/signature-request.js b/ui/app/components/signature-request.js index 1c031ef8..7a179cc1 100644 --- a/ui/app/components/signature-request.js +++ b/ui/app/components/signature-request.js @@ -122,7 +122,7 @@ SignatureRequest.prototype.renderBalance = function () { h('div.request-signature__balance-text', `${this.context.t('balance')}:`), - h('div.request-signature__balance-value', `${balanceInEther} DEX`), + h('div.request-signature__balance-value', `${balanceInEther} DXN`), ]) } diff --git a/ui/app/components/token-input/token-input.component.js b/ui/app/components/token-input/token-input.component.js index e85436b7..4d957237 100644 --- a/ui/app/components/token-input/token-input.component.js +++ b/ui/app/components/token-input/token-input.component.js @@ -5,7 +5,7 @@ import CurrencyDisplay from '../currency-display' import { getWeiHexFromDecimalValue } from '../../helpers/conversions.util' import ethUtil from 'ethereumjs-util' import { conversionUtil, multiplyCurrencies } from '../../conversion-util' -import { DEX } from '../../constants/common' +import { DXN } from '../../constants/common' /** * Component that allows user to enter token values as a number, and props receive a converted @@ -91,15 +91,15 @@ export default class TokenInput extends PureComponent { numberOfDecimals = 2 } else { // Display ETH - currency = DEX + currency = DXN numberOfDecimals = 6 } const decimalEthValue = (decimalValue * selectedTokenExchangeRate) || 0 const hexWeiValue = getWeiHexFromDecimalValue({ value: decimalEthValue, - fromCurrency: DEX, - fromDenomination: DEX, + fromCurrency: DXN, + fromDenomination: DXN, }) return selectedTokenExchangeRate diff --git a/ui/app/components/transaction-activity-log/index.scss b/ui/app/components/transaction-activity-log/index.scss index 27a56b28..60dda998 100644 --- a/ui/app/components/transaction-activity-log/index.scss +++ b/ui/app/components/transaction-activity-log/index.scss @@ -58,7 +58,7 @@ cursor: pointer; &:hover { - color: $black; + color: $white; } } diff --git a/ui/app/components/transaction-activity-log/transaction-activity-log.component.js b/ui/app/components/transaction-activity-log/transaction-activity-log.component.js index d6f90860..4cc7e905 100644 --- a/ui/app/components/transaction-activity-log/transaction-activity-log.component.js +++ b/ui/app/components/transaction-activity-log/transaction-activity-log.component.js @@ -29,7 +29,7 @@ export default class TransactionActivityLog extends PureComponent { const { metamaskNetworkId } = primaryTransaction const prefix = prefixForNetwork(metamaskNetworkId) - const etherscanUrl = `https://${prefix}etherscan.io/tx/${hash}` + const etherscanUrl = `https://${prefix}dexscan.app/transaction/${hash}` global.platform.openWindow({ url: etherscanUrl }) } diff --git a/ui/app/components/transaction-breakdown/transaction-breakdown.component.js b/ui/app/components/transaction-breakdown/transaction-breakdown.component.js index addb4006..0537076a 100644 --- a/ui/app/components/transaction-breakdown/transaction-breakdown.component.js +++ b/ui/app/components/transaction-breakdown/transaction-breakdown.component.js @@ -5,7 +5,7 @@ import TransactionBreakdownRow from './transaction-breakdown-row' import CurrencyDisplay from '../currency-display' import UserPreferencedCurrencyDisplay from '../user-preferenced-currency-display' import HexToDecimal from '../hex-to-decimal' -import { DEX, GWEI, PRIMARY, SECONDARY } from '../../constants/common' +import { DXN, GWEI, PRIMARY, SECONDARY } from '../../constants/common' import { getHexGasTotal } from '../../helpers/confirm-transaction/util' import { sumHexes } from '../../helpers/transactions.util' @@ -86,7 +86,7 @@ export default class TransactionBreakdown extends PureComponent { /> <UserPreferencedCurrencyDisplay className="transaction-breakdown__value" - currency={DEX} + currency={DXN} denomination={GWEI} value={gasPrice} hideLabel diff --git a/ui/app/components/transaction-list-item-details/index.scss b/ui/app/components/transaction-list-item-details/index.scss index 2e3a06f8..7fc1a488 100644 --- a/ui/app/components/transaction-list-item-details/index.scss +++ b/ui/app/components/transaction-list-item-details/index.scss @@ -7,7 +7,7 @@ } &__body { - background: #fafbfc; + background: $black; padding: 8px 16px; } diff --git a/ui/app/components/user-preferenced-currency-display/tests/user-preferenced-currency-display.container.test.js b/ui/app/components/user-preferenced-currency-display/tests/user-preferenced-currency-display.container.test.js index deb055fe..1af59004 100644 --- a/ui/app/components/user-preferenced-currency-display/tests/user-preferenced-currency-display.container.test.js +++ b/ui/app/components/user-preferenced-currency-display/tests/user-preferenced-currency-display.container.test.js @@ -46,7 +46,7 @@ describe('UserPreferencedCurrencyDisplay container', () => { }, result: { nativeCurrency: 'ETH', - currency: 'DEX', + currency: 'DXN', numberOfDecimals: 6, prefix: undefined, }, @@ -96,7 +96,7 @@ describe('UserPreferencedCurrencyDisplay container', () => { prefix: 'b', }, result: { - currency: 'DEX', + currency: 'DXN', numberOfDecimals: 3, prefix: 'b', }, diff --git a/ui/app/components/user-preferenced-currency-display/user-preferenced-currency-display.component.js b/ui/app/components/user-preferenced-currency-display/user-preferenced-currency-display.component.js index 40158a8d..6136ca00 100644 --- a/ui/app/components/user-preferenced-currency-display/user-preferenced-currency-display.component.js +++ b/ui/app/components/user-preferenced-currency-display/user-preferenced-currency-display.component.js @@ -1,6 +1,6 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' -import { PRIMARY, SECONDARY, DEX } from '../../constants/common' +import { PRIMARY, SECONDARY, DXN } from '../../constants/common' import CurrencyDisplay from '../currency-display' export default class UserPreferencedCurrencyDisplay extends PureComponent { @@ -27,7 +27,7 @@ export default class UserPreferencedCurrencyDisplay extends PureComponent { renderEthLogo () { const { currency, showEthLogo, ethLogoHeight = 12 } = this.props - return currency === DEX && showEthLogo && ( + return currency === DXN && showEthLogo && ( <img src="/images/dexon-invert.svg" height={ethLogoHeight} diff --git a/ui/app/components/user-preferenced-currency-display/user-preferenced-currency-display.container.js b/ui/app/components/user-preferenced-currency-display/user-preferenced-currency-display.container.js index f5aae92c..33152025 100644 --- a/ui/app/components/user-preferenced-currency-display/user-preferenced-currency-display.container.js +++ b/ui/app/components/user-preferenced-currency-display/user-preferenced-currency-display.container.js @@ -1,7 +1,7 @@ import { connect } from 'react-redux' import UserPreferencedCurrencyDisplay from './user-preferenced-currency-display.component' import { preferencesSelector } from '../../selectors' -import { DEX, PRIMARY, SECONDARY } from '../../constants/common' +import { DXN, PRIMARY, SECONDARY } from '../../constants/common' const mapStateToProps = (state, ownProps) => { const { useNativeCurrencyAsPrimaryCurrency } = preferencesSelector(state) @@ -30,7 +30,7 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => { if (type === PRIMARY && useNativeCurrencyAsPrimaryCurrency || type === SECONDARY && !useNativeCurrencyAsPrimaryCurrency) { // Display ETH - currency = nativeCurrency || DEX + currency = nativeCurrency || DXN numberOfDecimals = propsNumberOfDecimals || ethNumberOfDecimals || 6 prefix = propsPrefix || ethPrefix } else if (type === SECONDARY && useNativeCurrencyAsPrimaryCurrency || diff --git a/ui/app/constants/common.js b/ui/app/constants/common.js index 3472ae0a..731ce9c2 100644 --- a/ui/app/constants/common.js +++ b/ui/app/constants/common.js @@ -1,5 +1,5 @@ export const ETH = 'ETH' -export const DEX = 'DEX' +export const DXN = 'DXN' export const GWEI = 'GWEI' export const WEI = 'WEI' diff --git a/ui/app/conversion-util.js b/ui/app/conversion-util.js index 6e08b50d..f936548e 100644 --- a/ui/app/conversion-util.js +++ b/ui/app/conversion-util.js @@ -53,12 +53,12 @@ const toBigNumber = { const toNormalizedDenomination = { WEI: bigNumber => bigNumber.div(BIG_NUMBER_WEI_MULTIPLIER), GWEI: bigNumber => bigNumber.div(BIG_NUMBER_GWEI_MULTIPLIER), - DEX: bigNumber => bigNumber.div(BIG_NUMBER_ETH_MULTIPLIER), + DXN: bigNumber => bigNumber.div(BIG_NUMBER_ETH_MULTIPLIER), } const toSpecifiedDenomination = { WEI: bigNumber => bigNumber.times(BIG_NUMBER_WEI_MULTIPLIER).round(), GWEI: bigNumber => bigNumber.times(BIG_NUMBER_GWEI_MULTIPLIER).round(9), - DEX: bigNumber => bigNumber.times(BIG_NUMBER_ETH_MULTIPLIER).round(9), + DXN: bigNumber => bigNumber.times(BIG_NUMBER_ETH_MULTIPLIER).round(9), } const baseChange = { hex: n => n.toString(16), diff --git a/ui/app/helpers/confirm-transaction/util.js b/ui/app/helpers/confirm-transaction/util.js index f3a9620f..62a31f09 100644 --- a/ui/app/helpers/confirm-transaction/util.js +++ b/ui/app/helpers/confirm-transaction/util.js @@ -64,7 +64,7 @@ export function getValueFromWeiHex ({ return conversionUtil(value, { fromNumericBase: 'hex', toNumericBase: 'dec', - fromCurrency: 'DEX', + fromCurrency: 'DXN', toCurrency, numberOfDecimals, fromDenomination: 'WEI', @@ -84,7 +84,7 @@ export function getTransactionFee ({ fromNumericBase: 'BN', toNumericBase: 'dec', fromDenomination: 'WEI', - fromCurrency: 'DEX', + fromCurrency: 'DXN', toCurrency, numberOfDecimals, conversionRate, diff --git a/ui/app/helpers/conversions.util.js b/ui/app/helpers/conversions.util.js index fee340c3..eef54640 100644 --- a/ui/app/helpers/conversions.util.js +++ b/ui/app/helpers/conversions.util.js @@ -1,6 +1,6 @@ import ethUtil from 'ethereumjs-util' import { conversionUtil, addCurrencies } from '../conversion-util' -import { DEX, GWEI, WEI } from '../constants/common' +import { DXN, GWEI, WEI } from '../constants/common' export function bnToHex (inputBn) { return ethUtil.addHexPrefix(inputBn.toString(16)) @@ -20,8 +20,8 @@ export function decimalToHex (decimal) { }) } -export function getEthConversionFromWeiHex ({ value, conversionRate, numberOfDecimals = 6, fromCurrency = DEX }) { - const denominations = [DEX, GWEI, WEI] +export function getEthConversionFromWeiHex ({ value, conversionRate, numberOfDecimals = 6, fromCurrency = DXN }) { + const denominations = [DXN, GWEI, WEI] let nonZeroDenomination @@ -46,7 +46,7 @@ export function getEthConversionFromWeiHex ({ value, conversionRate, numberOfDec export function getValueFromWeiHex ({ value, - fromCurrency = DEX, + fromCurrency = DXN, toCurrency, conversionRate, numberOfDecimals, @@ -74,7 +74,7 @@ export function getWeiHexFromDecimalValue ({ return conversionUtil(value, { fromNumericBase: 'dec', toNumericBase: 'hex', - toCurrency: DEX, + toCurrency: DXN, fromCurrency, conversionRate, invertConversionRate, diff --git a/ui/app/helpers/formatters.js b/ui/app/helpers/formatters.js index f7499eaf..64ea38fa 100644 --- a/ui/app/helpers/formatters.js +++ b/ui/app/helpers/formatters.js @@ -1,3 +1,3 @@ export function formatETHFee (ethFee) { - return ethFee + ' DEX' + return ethFee + ' DXN' } diff --git a/ui/app/util.js b/ui/app/util.js index 558a7d19..5318c58a 100644 --- a/ui/app/util.js +++ b/ui/app/util.js @@ -128,7 +128,7 @@ function parseBalance (balance) { // Takes wei hex, returns an object with three properties. // Its "formatted" property is what we generally use to render values. -function formatBalance (balance, decimalsToKeep, needsParse = true, ticker = 'DEX') { +function formatBalance (balance, decimalsToKeep, needsParse = true, ticker = 'DXN') { var parsed = needsParse ? parseBalance(balance) : balance.split('.') var beforeDecimal = parsed[0] var afterDecimal = parsed[1] |