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:
parent
c4e48d9263
commit
1405237479
@ -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'}
|
||||||
/>
|
/>
|
||||||
|
@ -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')
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user