aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-05-24 23:36:48 +0800
committerDan <danjm.com@gmail.com>2018-05-25 00:01:14 +0800
commit1405237479621d7258468e6c7694415b0afbb045 (patch)
treef2c8640f9ddb70a1bb5f26032740f98917f9e2ab
parentc4e48d9263cb251695afc28d936f7abb0e033f5c (diff)
downloadtangerine-wallet-browser-1405237479621d7258468e6c7694415b0afbb045.tar
tangerine-wallet-browser-1405237479621d7258468e6c7694415b0afbb045.tar.gz
tangerine-wallet-browser-1405237479621d7258468e6c7694415b0afbb045.tar.bz2
tangerine-wallet-browser-1405237479621d7258468e6c7694415b0afbb045.tar.lz
tangerine-wallet-browser-1405237479621d7258468e6c7694415b0afbb045.tar.xz
tangerine-wallet-browser-1405237479621d7258468e6c7694415b0afbb045.tar.zst
tangerine-wallet-browser-1405237479621d7258468e6c7694415b0afbb045.zip
Fix display of primary currency symbol in send amount row
-rw-r--r--ui/app/components/send_/send-content/send-amount-row/send-amount-row.component.js4
-rw-r--r--ui/app/components/send_/send-content/send-amount-row/tests/send-amount-row-component.test.js6
2 files changed, 8 insertions, 2 deletions
diff --git a/ui/app/components/send_/send-content/send-amount-row/send-amount-row.component.js b/ui/app/components/send_/send-content/send-amount-row/send-amount-row.component.js
index be301ca7d..b094d0cd5 100644
--- a/ui/app/components/send_/send-content/send-amount-row/send-amount-row.component.js
+++ b/ui/app/components/send_/send-content/send-amount-row/send-amount-row.component.js
@@ -64,7 +64,7 @@ export default class SendAmountRow extends Component {
convertedCurrency,
gasTotal,
inError,
- primaryCurrency = 'ETH',
+ primaryCurrency,
selectedToken,
} = this.props
@@ -80,7 +80,7 @@ export default class SendAmountRow extends Component {
convertedCurrency={convertedCurrency}
handleChange={newAmount => this.handleAmountChange(newAmount)}
inError={inError}
- primaryCurrency={primaryCurrency}
+ primaryCurrency={primaryCurrency || 'ETH'}
selectedToken={selectedToken}
value={amount || '0x0'}
/>
diff --git a/ui/app/components/send_/send-content/send-amount-row/tests/send-amount-row-component.test.js b/ui/app/components/send_/send-content/send-amount-row/tests/send-amount-row-component.test.js
index 8355ebf10..31d2e2515 100644
--- a/ui/app/components/send_/send-content/send-amount-row/tests/send-amount-row-component.test.js
+++ b/ui/app/components/send_/send-content/send-amount-row/tests/send-amount-row-component.test.js
@@ -156,5 +156,11 @@ describe('SendAmountRow Component', function () {
['mockNewAmount']
)
})
+
+ it('should pass the default primaryCurrency to the CurrencyDisplay if primaryCurrency is falsy', () => {
+ wrapper.setProps({ primaryCurrency: null })
+ const { primaryCurrency } = wrapper.find(SendRowWrapper).childAt(1).props()
+ assert.equal(primaryCurrency, 'ETH')
+ })
})
})