1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-23 03:36:18 +02: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,
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'}
/>

View File

@ -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')
})
})
})