fixed: showing tx-s as errors vs. warning

feature/default_network_editable
frankiebee 7 years ago
parent cddff73703
commit fa3df576bc
  1. 15
      ui/app/components/transaction-list-item.js

@ -154,12 +154,21 @@ function failIfFailed (transaction) {
if (transaction.status === 'rejected') { if (transaction.status === 'rejected') {
return h('span.error', ' (Rejected)') return h('span.error', ' (Rejected)')
} }
if (transaction.err) { if (transaction.err || transaction.warning) {
const { err, warning = {} } = transaction
const errFirst = !!(( err && warning ) || err)
const message = errFirst ? err.message : warning.message
errFirst ? err.message : warning.message
return h(Tooltip, { return h(Tooltip, {
title: transaction.err.message, title: message,
position: 'bottom', position: 'bottom',
}, [ }, [
h('span.error', ' (Failed)'), h(`span.${errFirst ? 'error' : 'warning'}`,
` (${errFirst ? 'Failed' : 'Warning'})`
),
]) ])
} }
} }

Loading…
Cancel
Save