aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/transaction-list-item.js
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2017-08-09 07:23:14 +0800
committerGitHub <noreply@github.com>2017-08-09 07:23:14 +0800
commit922ecb914963c420ef2acdb9e2db91444065f62f (patch)
tree9135982572ae502242d5cce39890593f1fec68f8 /ui/app/components/transaction-list-item.js
parent67e4855b9d79afb3046c6499f4610cb5a8b70837 (diff)
parent7db1f30590c9dbd01456517ebf0a24e1f76ddd40 (diff)
downloadtangerine-wallet-browser-922ecb914963c420ef2acdb9e2db91444065f62f.tar.gz
tangerine-wallet-browser-922ecb914963c420ef2acdb9e2db91444065f62f.tar.zst
tangerine-wallet-browser-922ecb914963c420ef2acdb9e2db91444065f62f.zip
Merge branch 'master' into greenkeeper/initial
Diffstat (limited to 'ui/app/components/transaction-list-item.js')
-rw-r--r--ui/app/components/transaction-list-item.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/ui/app/components/transaction-list-item.js b/ui/app/components/transaction-list-item.js
index b94c24494..9018bab06 100644
--- a/ui/app/components/transaction-list-item.js
+++ b/ui/app/components/transaction-list-item.js
@@ -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'})`
+ ),
])
}
}