From 1405237479621d7258468e6c7694415b0afbb045 Mon Sep 17 00:00:00 2001
From: Dan <danjm.com@gmail.com>
Date: Thu, 24 May 2018 13:06:48 -0230
Subject: Fix display of primary currency symbol in send amount row

---
 .../send_/send-content/send-amount-row/send-amount-row.component.js | 4 ++--
 .../send-amount-row/tests/send-amount-row-component.test.js         | 6 ++++++
 2 files changed, 8 insertions(+), 2 deletions(-)

(limited to 'ui/app/components/send_')

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')
+    })
   })
 })
-- 
cgit v1.2.3