aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/modals
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2018-10-18 08:30:07 +0800
committerGitHub <noreply@github.com>2018-10-18 08:30:07 +0800
commitc2f97717c0fbf9a64cf527891f7a1f35049fb023 (patch)
treef62dabf7a62798ad82641305422fb4e0bcc0a74a /ui/app/components/modals
parent85884b21afe6e5e85b58123b24e72776d1437cc6 (diff)
parent17372e150d7070e9f4870e65a7d6c1d88568f2f5 (diff)
downloadtangerine-wallet-browser-c2f97717c0fbf9a64cf527891f7a1f35049fb023.tar.gz
tangerine-wallet-browser-c2f97717c0fbf9a64cf527891f7a1f35049fb023.tar.zst
tangerine-wallet-browser-c2f97717c0fbf9a64cf527891f7a1f35049fb023.zip
Merge pull request #5539 from MetaMask/v4.16.0
Version 4.16.0
Diffstat (limited to 'ui/app/components/modals')
-rw-r--r--ui/app/components/modals/cancel-transaction/cancel-transaction-gas-fee/cancel-transaction-gas-fee.component.js12
-rw-r--r--ui/app/components/modals/cancel-transaction/cancel-transaction-gas-fee/tests/cancel-transaction-gas-fee.component.test.js9
2 files changed, 10 insertions, 11 deletions
diff --git a/ui/app/components/modals/cancel-transaction/cancel-transaction-gas-fee/cancel-transaction-gas-fee.component.js b/ui/app/components/modals/cancel-transaction/cancel-transaction-gas-fee/cancel-transaction-gas-fee.component.js
index b082db1d0..b973f221c 100644
--- a/ui/app/components/modals/cancel-transaction/cancel-transaction-gas-fee/cancel-transaction-gas-fee.component.js
+++ b/ui/app/components/modals/cancel-transaction/cancel-transaction-gas-fee/cancel-transaction-gas-fee.component.js
@@ -1,7 +1,7 @@
import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
-import CurrencyDisplay from '../../../currency-display'
-import { ETH } from '../../../../constants/common'
+import UserPreferencedCurrencyDisplay from '../../../user-preferenced-currency-display'
+import { PRIMARY, SECONDARY } from '../../../../constants/common'
export default class CancelTransaction extends PureComponent {
static propTypes = {
@@ -13,15 +13,15 @@ export default class CancelTransaction extends PureComponent {
return (
<div className="cancel-transaction-gas-fee">
- <CurrencyDisplay
+ <UserPreferencedCurrencyDisplay
className="cancel-transaction-gas-fee__eth"
- currency={ETH}
value={value}
- numberOfDecimals={6}
+ type={PRIMARY}
/>
- <CurrencyDisplay
+ <UserPreferencedCurrencyDisplay
className="cancel-transaction-gas-fee__fiat"
value={value}
+ type={SECONDARY}
/>
</div>
)
diff --git a/ui/app/components/modals/cancel-transaction/cancel-transaction-gas-fee/tests/cancel-transaction-gas-fee.component.test.js b/ui/app/components/modals/cancel-transaction/cancel-transaction-gas-fee/tests/cancel-transaction-gas-fee.component.test.js
index 994c2a577..014815503 100644
--- a/ui/app/components/modals/cancel-transaction/cancel-transaction-gas-fee/tests/cancel-transaction-gas-fee.component.test.js
+++ b/ui/app/components/modals/cancel-transaction/cancel-transaction-gas-fee/tests/cancel-transaction-gas-fee.component.test.js
@@ -2,7 +2,7 @@ import React from 'react'
import assert from 'assert'
import { shallow } from 'enzyme'
import CancelTransactionGasFee from '../cancel-transaction-gas-fee.component'
-import CurrencyDisplay from '../../../../currency-display'
+import UserPreferencedCurrencyDisplay from '../../../../user-preferenced-currency-display'
describe('CancelTransactionGasFee Component', () => {
it('should render', () => {
@@ -13,12 +13,11 @@ describe('CancelTransactionGasFee Component', () => {
)
assert.ok(wrapper)
- assert.equal(wrapper.find(CurrencyDisplay).length, 2)
- const ethDisplay = wrapper.find(CurrencyDisplay).at(0)
- const fiatDisplay = wrapper.find(CurrencyDisplay).at(1)
+ assert.equal(wrapper.find(UserPreferencedCurrencyDisplay).length, 2)
+ const ethDisplay = wrapper.find(UserPreferencedCurrencyDisplay).at(0)
+ const fiatDisplay = wrapper.find(UserPreferencedCurrencyDisplay).at(1)
assert.equal(ethDisplay.props().value, '0x3b9aca00')
- assert.equal(ethDisplay.props().currency, 'ETH')
assert.equal(ethDisplay.props().className, 'cancel-transaction-gas-fee__eth')
assert.equal(fiatDisplay.props().value, '0x3b9aca00')