mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-26 12:29:06 +01:00
fixed: showing tx-s as errors vs. warning
This commit is contained in:
parent
cddff73703
commit
fa3df576bc
@ -154,12 +154,21 @@ function failIfFailed (transaction) {
|
||||
if (transaction.status === '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, {
|
||||
title: transaction.err.message,
|
||||
title: message,
|
||||
position: 'bottom',
|
||||
}, [
|
||||
h('span.error', ' (Failed)'),
|
||||
h(`span.${errFirst ? 'error' : 'warning'}`,
|
||||
` (${errFirst ? 'Failed' : 'Warning'})`
|
||||
),
|
||||
])
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user