aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfrankiebee <frankie.diamond@gmail.com>2017-08-05 02:43:08 +0800
committerfrankiebee <frankie.diamond@gmail.com>2017-08-05 02:43:08 +0800
commitfa3df576bcf879904b303c4ed1015d27db64642d (patch)
treecc79aed9e73765338e8ff89b6c4b78a9693ced05
parentcddff73703e9f6611e5ad793d6d05ba91ee96e06 (diff)
downloadtangerine-wallet-browser-fa3df576bcf879904b303c4ed1015d27db64642d.tar.gz
tangerine-wallet-browser-fa3df576bcf879904b303c4ed1015d27db64642d.tar.zst
tangerine-wallet-browser-fa3df576bcf879904b303c4ed1015d27db64642d.zip
fixed: showing tx-s as errors vs. warning
-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 dbda66a31..01355abad 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'})`
+ ),
])
}
}