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

Fix currency display send integration tests.

This commit is contained in:
Dan 2018-05-31 12:07:23 -02:30
parent 7f23e017b2
commit 67c74cd5b6
2 changed files with 2 additions and 2 deletions

View File

@ -101,7 +101,7 @@ async function runSendFlowTest(assert, done) {
const sendAmountField = await queryAsync($, '.send-v2__form-row:eq(2)') const sendAmountField = await queryAsync($, '.send-v2__form-row:eq(2)')
sendAmountField.find('.currency-display')[0].click() sendAmountField.find('.currency-display')[0].click()
const sendAmountFieldInput = await findAsync(sendAmountField, 'input:text') const sendAmountFieldInput = await findAsync(sendAmountField, '.currency-display__input')
sendAmountFieldInput.val('5.1') sendAmountFieldInput.val('5.1')
reactTriggerChange(sendAmountField.find('input')[0]) reactTriggerChange(sendAmountField.find('input')[0])

View File

@ -49,7 +49,7 @@ CurrencyDisplay.prototype.getAmount = function (value) {
} }
CurrencyDisplay.prototype.getValueToRender = function ({ selectedToken, conversionRate, value }) { CurrencyDisplay.prototype.getValueToRender = function ({ selectedToken, conversionRate, value }) {
if (value === '0x0') return '' if (value === '0x0') return '0'
const { decimals, symbol } = selectedToken || {} const { decimals, symbol } = selectedToken || {}
const multiplier = Math.pow(10, Number(decimals || 0)) const multiplier = Math.pow(10, Number(decimals || 0))