1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Fix display of primary currency symbol in send amount row

This commit is contained in:
Dan 2018-05-24 13:06:48 -02:30
parent c4e48d9263
commit 1405237479
2 changed files with 8 additions and 2 deletions

View File

@ -64,7 +64,7 @@ export default class SendAmountRow extends Component {
convertedCurrency, convertedCurrency,
gasTotal, gasTotal,
inError, inError,
primaryCurrency = 'ETH', primaryCurrency,
selectedToken, selectedToken,
} = this.props } = this.props
@ -80,7 +80,7 @@ export default class SendAmountRow extends Component {
convertedCurrency={convertedCurrency} convertedCurrency={convertedCurrency}
handleChange={newAmount => this.handleAmountChange(newAmount)} handleChange={newAmount => this.handleAmountChange(newAmount)}
inError={inError} inError={inError}
primaryCurrency={primaryCurrency} primaryCurrency={primaryCurrency || 'ETH'}
selectedToken={selectedToken} selectedToken={selectedToken}
value={amount || '0x0'} value={amount || '0x0'}
/> />

View File

@ -156,5 +156,11 @@ describe('SendAmountRow Component', function () {
['mockNewAmount'] ['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')
})
}) })
}) })