diff options
author | kumavis <kumavis@users.noreply.github.com> | 2017-08-09 06:54:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-09 06:54:08 +0800 |
commit | cd1437fdd3fa897720733a5a5099e640bde5dfa2 (patch) | |
tree | e828cebde61f8fef7efc483a9fee43748318f4b7 /ui/app/components | |
parent | 57abc58d623b66a091987a944d8c45737f4feabe (diff) | |
parent | 88b84e389513c3486e99c09b9a589c2a6f636248 (diff) | |
download | tangerine-wallet-browser-cd1437fdd3fa897720733a5a5099e640bde5dfa2.tar tangerine-wallet-browser-cd1437fdd3fa897720733a5a5099e640bde5dfa2.tar.gz tangerine-wallet-browser-cd1437fdd3fa897720733a5a5099e640bde5dfa2.tar.bz2 tangerine-wallet-browser-cd1437fdd3fa897720733a5a5099e640bde5dfa2.tar.lz tangerine-wallet-browser-cd1437fdd3fa897720733a5a5099e640bde5dfa2.tar.xz 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/app/components')
-rw-r--r-- | ui/app/components/transaction-list-item.js | 15 |
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'})` + ), ]) } } |