aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2017-08-09 06:54:08 +0800
committerGitHub <noreply@github.com>2017-08-09 06:54:08 +0800
commitcd1437fdd3fa897720733a5a5099e640bde5dfa2 (patch)
treee828cebde61f8fef7efc483a9fee43748318f4b7 /ui
parent57abc58d623b66a091987a944d8c45737f4feabe (diff)
parent88b84e389513c3486e99c09b9a589c2a6f636248 (diff)
downloadtangerine-wallet-browser-cd1437fdd3fa897720733a5a5099e640bde5dfa2.tar.gz
tangerine-wallet-browser-cd1437fdd3fa897720733a5a5099e640bde5dfa2.tar.zst
tangerine-wallet-browser-cd1437fdd3fa897720733a5a5099e640bde5dfa2.zip
Merge pull request #1861 from MetaMask/transactionControllerRefractor
Transaction controller refractor part 2
Diffstat (limited to 'ui')
-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'})`
+ ),
])
}
}