aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components
diff options
context:
space:
mode:
authorHsuan Lee <boczeratul@gmail.com>2018-10-24 15:40:38 +0800
committerHsuan Lee <hsuan@cobinhood.com>2018-12-10 18:27:43 +0800
commitb9b8c9d70bfa12aa5c752f05d676b2e1a67405b6 (patch)
tree6f38bcb507cf0c1286379ac4320a02c8a15679cc /ui/app/components
parent1707172b35661330c34ed90209676ecc945611f9 (diff)
downloaddexon-wallet-b9b8c9d70bfa12aa5c752f05d676b2e1a67405b6.tar.gz
dexon-wallet-b9b8c9d70bfa12aa5c752f05d676b2e1a67405b6.tar.zst
dexon-wallet-b9b8c9d70bfa12aa5c752f05d676b2e1a67405b6.zip
Update Dexon wording
Diffstat (limited to 'ui/app/components')
-rw-r--r--ui/app/components/currency-display/index.scss1
-rw-r--r--ui/app/components/currency-display/tests/currency-display.container.test.js18
-rw-r--r--ui/app/components/currency-input/currency-input.component.js12
-rw-r--r--ui/app/components/currency-input/currency-input.container.js6
-rw-r--r--ui/app/components/currency-input/tests/currency-input.container.test.js4
-rw-r--r--ui/app/components/pages/confirm-token-transaction-base/confirm-token-transaction-base.component.js8
-rw-r--r--ui/app/components/send/send-header/send-header.selectors.js4
-rw-r--r--ui/app/components/send/send-header/tests/send-header-selectors.test.js4
-rw-r--r--ui/app/components/shapeshift-form.js4
-rw-r--r--ui/app/components/signature-request.js2
-rw-r--r--ui/app/components/token-input/token-input.component.js8
-rw-r--r--ui/app/components/transaction-action/tests/transaction-action.component.test.js6
-rw-r--r--ui/app/components/transaction-breakdown/transaction-breakdown.component.js8
-rw-r--r--ui/app/components/unit-input/index.scss8
-rw-r--r--ui/app/components/user-preferenced-currency-display/tests/user-preferenced-currency-display.container.test.js5
-rw-r--r--ui/app/components/user-preferenced-currency-display/user-preferenced-currency-display.component.js6
-rw-r--r--ui/app/components/user-preferenced-currency-display/user-preferenced-currency-display.container.js4
17 files changed, 54 insertions, 54 deletions
diff --git a/ui/app/components/currency-display/index.scss b/ui/app/components/currency-display/index.scss
index 313c932b..17410dc9 100644
--- a/ui/app/components/currency-display/index.scss
+++ b/ui/app/components/currency-display/index.scss
@@ -6,6 +6,7 @@
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
+ color: $white;
}
&__suffix {
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 9888c366..7973bf60 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,21 +69,18 @@ describe('CurrencyDisplay container', () => {
{
props: {
value: '0x1193461d01595930',
- currency: 'ETH',
- nativeCurrency: 'ETH',
+ currency: 'DEX',
numberOfDecimals: 3,
},
result: {
displayValue: '1.266',
- suffix: 'ETH',
- nativeCurrency: 'ETH',
+ suffix: 'DEX',
},
},
{
props: {
value: '0x1193461d01595930',
- currency: 'ETH',
- nativeCurrency: 'ETH',
+ currency: 'DEX',
numberOfDecimals: 3,
hideLabel: true,
},
@@ -96,8 +93,7 @@ describe('CurrencyDisplay container', () => {
{
props: {
value: '0x3b9aca00',
- currency: 'ETH',
- nativeCurrency: 'ETH',
+ currency: 'DEX',
denomination: 'GWEI',
hideLabel: true,
},
@@ -110,8 +106,7 @@ describe('CurrencyDisplay container', () => {
{
props: {
value: '0x3b9aca00',
- currency: 'ETH',
- nativeCurrency: 'ETH',
+ currency: 'DEX',
denomination: 'WEI',
hideLabel: true,
},
@@ -124,8 +119,7 @@ describe('CurrencyDisplay container', () => {
{
props: {
value: '0x3b9aca00',
- currency: 'ETH',
- nativeCurrency: 'ETH',
+ currency: 'DEX',
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 0761a75c..8a12851d 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 { ETH } from '../../constants/common'
+import { DEX } 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: ETH, numberOfDecimals: 6,
+ value: hexValue, toCurrency: DEX, 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: ETH, fromDenomination: ETH, conversionRate,
+ value: decimalValue, fromCurrency: DEX, fromDenomination: DEX, conversionRate,
})
this.setState({ hexValue, decimalValue })
@@ -78,13 +78,13 @@ export default class CurrencyInput extends PureComponent {
}
renderConversionComponent () {
- const { useFiat, currentCurrency, nativeCurrency } = this.props
+ const { useFiat, currentCurrency } = this.props
const { hexValue } = this.state
let currency, numberOfDecimals
if (useFiat) {
- // Display ETH
- currency = nativeCurrency || ETH
+ // Display DEX
+ currency = DEX
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 1d1ed7b4..941e9380 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 { ETH } from '../../constants/common'
+import { DEX } from '../../constants/common'
const mapStateToProps = state => {
const { metamask: { nativeCurrency, currentCurrency, conversionRate } } = state
@@ -13,9 +13,9 @@ const mapStateToProps = state => {
}
const mergeProps = (stateProps, dispatchProps, ownProps) => {
- const { nativeCurrency, currentCurrency } = stateProps
+ const { currentCurrency } = stateProps
const { useFiat } = ownProps
- const suffix = useFiat ? currentCurrency.toUpperCase() : nativeCurrency || ETH
+ const suffix = useFiat ? currentCurrency.toUpperCase() : DEX
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 5d72958e..27965ec0 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,12 @@ describe('CurrencyInput container', () => {
assert.deepEqual(mergeProps(mockStateProps, mockDispatchProps, {}), {
conversionRate: 280.45,
currentCurrency: 'usd',
+<<<<<<< HEAD
nativeCurrency: 'ETH',
suffix: 'ETH',
+=======
+ suffix: 'DEX',
+>>>>>>> Update Dexon wording
})
})
})
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 7f1fb4e4..dfd1cea8 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 { ETH, PRIMARY } from '../../../constants/common'
+import { DEX, 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: ETH,
- fromDenomination: ETH,
+ fromCurrency: DEX,
+ fromDenomination: DEX,
})
return typeof contractExchangeRate === 'undefined'
@@ -72,7 +72,7 @@ export default class ConfirmTokenTransactionBase extends Component {
<div>
<span>{ `${tokensText} + ` }</span>
<img
- src="/images/eth.svg"
+ src="/images/dexon_logo.svg"
height="18"
/>
<span>{ ethTransactionTotal }</span>
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 d7c9d376..3d5ca404 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 'sendETH'
+ return 'sendDEX'
}
}
@@ -32,6 +32,6 @@ function getSubtitleParams (state) {
} else if (token) {
return [ 'onlySendTokensToAccountAddress', [ token.symbol ] ]
} else {
- return [ 'onlySendToEtherAddress' ]
+ return [ 'onlySendToDexonAddress' ]
}
}
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 e0c6a3ab..d6d090ae 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 }), 'sendETH')
+ assert.equal(getTitleKey({ e: null }), 'sendDEX')
})
})
@@ -40,7 +40,7 @@ describe('send-header selectors', () => {
})
it('should return the correct params when getSendEditingTransactionId is falsy and getSelectedToken is falsy', () => {
- assert.deepEqual(getSubtitleParams({ e: null }), [ 'onlySendToEtherAddress' ])
+ assert.deepEqual(getSubtitleParams({ e: null }), [ 'onlySendToDexonAddress' ])
})
})
diff --git a/ui/app/components/shapeshift-form.js b/ui/app/components/shapeshift-form.js
index a842bcc8..14513959 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()}_ETH`
+ return `${this.state.depositCoin.toUpperCase()}_DEX`
}
ShapeshiftForm.prototype.componentWillMount = function () {
@@ -211,7 +211,7 @@ ShapeshiftForm.prototype.render = function () {
this.context.t('receive'),
]),
- h('div.shapeshift-form__selector-input', ['ETH']),
+ h('div.shapeshift-form__selector-input', ['DEX']),
]),
diff --git a/ui/app/components/signature-request.js b/ui/app/components/signature-request.js
index 85af3b00..1c031ef8 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} ETH`),
+ h('div.request-signature__balance-value', `${balanceInEther} DEX`),
])
}
diff --git a/ui/app/components/token-input/token-input.component.js b/ui/app/components/token-input/token-input.component.js
index 10fa1151..e85436b7 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 { ETH } from '../../constants/common'
+import { DEX } 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 = ETH
+ currency = DEX
numberOfDecimals = 6
}
const decimalEthValue = (decimalValue * selectedTokenExchangeRate) || 0
const hexWeiValue = getWeiHexFromDecimalValue({
value: decimalEthValue,
- fromCurrency: ETH,
- fromDenomination: ETH,
+ fromCurrency: DEX,
+ fromDenomination: DEX,
})
return selectedTokenExchangeRate
diff --git a/ui/app/components/transaction-action/tests/transaction-action.component.test.js b/ui/app/components/transaction-action/tests/transaction-action.component.test.js
index b22a9db3..b2f33274 100644
--- a/ui/app/components/transaction-action/tests/transaction-action.component.test.js
+++ b/ui/app/components/transaction-action/tests/transaction-action.component.test.js
@@ -57,7 +57,7 @@ describe('TransactionAction Component', () => {
gas: '0x5208',
gasPrice: '0x3b9aca00',
nonce: '0x96',
- to: 'sentEtherAddress',
+ to: 'sentDexonAddress',
value: '0x2386f26fc10000',
},
}
@@ -69,8 +69,8 @@ describe('TransactionAction Component', () => {
/>, { context: { t }})
assert.equal(wrapper.find('.transaction-action').length, 1)
- wrapper.setState({ transactionAction: 'sentEther' })
- assert.equal(wrapper.text(), 'sentEther')
+ wrapper.setState({ transactionAction: 'sentDexon' })
+ assert.equal(wrapper.text(), 'sentDexon')
})
it('should render Approved', async () => {
diff --git a/ui/app/components/transaction-breakdown/transaction-breakdown.component.js b/ui/app/components/transaction-breakdown/transaction-breakdown.component.js
index 141e16e1..addb4006 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 { GWEI, PRIMARY, SECONDARY } from '../../constants/common'
+import { DEX, GWEI, PRIMARY, SECONDARY } from '../../constants/common'
import { getHexGasTotal } from '../../helpers/confirm-transaction/util'
import { sumHexes } from '../../helpers/transactions.util'
@@ -86,8 +86,10 @@ export default class TransactionBreakdown extends PureComponent {
/>
<UserPreferencedCurrencyDisplay
className="transaction-breakdown__value"
- type={SECONDARY}
- value={totalInHex}
+ currency={DEX}
+ denomination={GWEI}
+ value={gasPrice}
+ hideLabel
/>
</div>
</TransactionBreakdownRow>
diff --git a/ui/app/components/unit-input/index.scss b/ui/app/components/unit-input/index.scss
index 7995696a..7af91df9 100644
--- a/ui/app/components/unit-input/index.scss
+++ b/ui/app/components/unit-input/index.scss
@@ -1,9 +1,9 @@
.unit-input {
min-height: 54px;
- border: 1px solid #dedede;
+ border: 1px solid $tundora;
border-radius: 4px;
- background-color: #fff;
- color: #4d4d4d;
+ background-color: $dark-gray;
+ color: $dim-gray;
font-size: 1rem;
padding: 8px 10px;
position: relative;
@@ -25,7 +25,7 @@
}
&__input {
- color: #4d4d4d;
+ color: $white;
font-size: 1rem;
font-family: Roboto;
border: none;
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 ba1c23d8..2232e825 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,8 +46,8 @@ describe('UserPreferencedCurrencyDisplay container', () => {
type: 'PRIMARY',
},
result: {
- currency: 'ETH',
nativeCurrency: 'ETH',
+ currency: 'DEX',
numberOfDecimals: 6,
prefix: undefined,
},
@@ -97,8 +97,7 @@ describe('UserPreferencedCurrencyDisplay container', () => {
prefix: 'b',
},
result: {
- currency: 'ETH',
- nativeCurrency: 'ETH',
+ currency: 'DEX',
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 f2a834ea..06d9c146 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, ETH } from '../../constants/common'
+import { PRIMARY, SECONDARY, DEX } from '../../constants/common'
import CurrencyDisplay from '../currency-display'
export default class UserPreferencedCurrencyDisplay extends PureComponent {
@@ -27,9 +27,9 @@ export default class UserPreferencedCurrencyDisplay extends PureComponent {
renderEthLogo () {
const { currency, showEthLogo, ethLogoHeight = 12 } = this.props
- return currency === ETH && showEthLogo && (
+ return currency === DEX && showEthLogo && (
<img
- src="/images/eth.svg"
+ src="/images/dexon_logo.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 7999301a..af60aa1d 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 { ETH, PRIMARY, SECONDARY } from '../../constants/common'
+import { DEX, 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 || ETH
+ currency = nativeCurrency || DEX
numberOfDecimals = propsNumberOfDecimals || ethNumberOfDecimals || 6
prefix = propsPrefix || ethPrefix
} else if (type === SECONDARY && useNativeCurrencyAsPrimaryCurrency ||