Fix currency display send integration tests.

feature/default_network_editable
Dan 7 years ago
parent 7f23e017b2
commit 67c74cd5b6
  1. 2
      test/integration/lib/send-new-ui.js
  2. 2
      ui/app/components/send/currency-display.js

@ -101,7 +101,7 @@ async function runSendFlowTest(assert, done) {
const sendAmountField = await queryAsync($, '.send-v2__form-row:eq(2)')
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')
reactTriggerChange(sendAmountField.find('input')[0])

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

Loading…
Cancel
Save