diff options
author | Dan Finlay <dan@danfinlay.com> | 2017-10-06 02:55:23 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2017-10-06 02:55:23 +0800 |
commit | c5b7880f051b1ee47a9f8eecc6ea5c553f9efa6c (patch) | |
tree | 8b3ee94a666dd23aa9a3f9579abaf39939a0d161 /ui | |
parent | e11ca1289019123cd143adcb6312186452630723 (diff) | |
parent | 35f4148343cf4400f7a38eef07282cae44cd0335 (diff) | |
download | tangerine-wallet-browser-c5b7880f051b1ee47a9f8eecc6ea5c553f9efa6c.tar tangerine-wallet-browser-c5b7880f051b1ee47a9f8eecc6ea5c553f9efa6c.tar.gz tangerine-wallet-browser-c5b7880f051b1ee47a9f8eecc6ea5c553f9efa6c.tar.bz2 tangerine-wallet-browser-c5b7880f051b1ee47a9f8eecc6ea5c553f9efa6c.tar.lz tangerine-wallet-browser-c5b7880f051b1ee47a9f8eecc6ea5c553f9efa6c.tar.xz tangerine-wallet-browser-c5b7880f051b1ee47a9f8eecc6ea5c553f9efa6c.tar.zst tangerine-wallet-browser-c5b7880f051b1ee47a9f8eecc6ea5c553f9efa6c.zip |
Merge branch 'master' into SignTypedData
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/account-detail.js | 4 | ||||
-rw-r--r-- | ui/app/app.js | 8 | ||||
-rw-r--r-- | ui/app/components/pending-tx.js | 6 | ||||
-rw-r--r-- | ui/app/components/transaction-list-item.js | 34 | ||||
-rw-r--r-- | ui/app/info.js | 7 |
5 files changed, 27 insertions, 32 deletions
diff --git a/ui/app/account-detail.js b/ui/app/account-detail.js index 90724dc3f..a844daf88 100644 --- a/ui/app/account-detail.js +++ b/ui/app/account-detail.js @@ -46,7 +46,7 @@ AccountDetailScreen.prototype.render = function () { var selected = props.address || Object.keys(props.accounts)[0] var checksumAddress = selected && ethUtil.toChecksumAddress(selected) var identity = props.identities[selected] - var account = props.computedBalances[selected] + var account = props.accounts[selected] const { network, conversionRate, currentCurrency } = props return ( @@ -181,7 +181,7 @@ AccountDetailScreen.prototype.render = function () { }, [ h(EthBalance, { - value: account && account.ethBalance, + value: account && account.balance, conversionRate, currentCurrency, style: { diff --git a/ui/app/app.js b/ui/app/app.js index 50121b055..613577913 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -167,14 +167,6 @@ App.prototype.renderAppBar = function () { }), ]), - // metamask name - props.isUnlocked && h('h1', { - style: { - position: 'relative', - left: '9px', - }, - }, 'MetaMask'), - props.isUnlocked && h('div', { style: { display: 'flex', diff --git a/ui/app/components/pending-tx.js b/ui/app/components/pending-tx.js index 6f8c19a3c..c3350fcc1 100644 --- a/ui/app/components/pending-tx.js +++ b/ui/app/components/pending-tx.js @@ -33,7 +33,7 @@ function PendingTx () { PendingTx.prototype.render = function () { const props = this.props - const { currentCurrency, blockGasLimit, computedBalances } = props + const { currentCurrency, blockGasLimit } = props const conversionRate = props.conversionRate const txMeta = this.gatherTxMeta() @@ -42,8 +42,8 @@ PendingTx.prototype.render = function () { // Account Details const address = txParams.from || props.selectedAddress const identity = props.identities[address] || { address: address } - const account = computedBalances[address] - const balance = account ? account.ethBalance : '0x0' + const account = props.accounts[address] + const balance = account ? account.balance : '0x0' // recipient check const isValidAddress = !txParams.to || util.isValidAddress(txParams.to) diff --git a/ui/app/components/transaction-list-item.js b/ui/app/components/transaction-list-item.js index 0e5c0b5a3..a9961f47c 100644 --- a/ui/app/components/transaction-list-item.js +++ b/ui/app/components/transaction-list-item.js @@ -133,7 +133,7 @@ function recipientField (txParams, transaction, isTx, isMsg) { }, }, [ message, - failIfFailed(transaction), + renderErrorOrWarning(transaction), ]) } @@ -141,25 +141,35 @@ function formatDate (date) { return vreme.format(new Date(date), 'March 16 2014 14:30') } -function failIfFailed (transaction) { - if (transaction.status === 'rejected') { +function renderErrorOrWarning (transaction) { + const { status, err, warning } = transaction + + // show rejected + if (status === 'rejected') { return h('span.error', ' (Rejected)') } - 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 + // show error + if (err) { + const message = err.message || '' + return ( + h(Tooltip, { + title: message, + position: 'bottom', + }, [ + h(`span.error`, ` (Failed)`), + ]) + ) + } + // show warning + if (warning) { + const message = warning.message return h(Tooltip, { title: message, position: 'bottom', }, [ - h(`span.${errFirst ? 'error' : 'warning'}`, - ` (${errFirst ? 'Failed' : 'Warning'})` - ), + h(`span.warning`, ` (Warning)`), ]) } } diff --git a/ui/app/info.js b/ui/app/info.js index 4c7d4cb4c..24c211c1f 100644 --- a/ui/app/info.js +++ b/ui/app/info.js @@ -126,13 +126,6 @@ InfoScreen.prototype.render = function () { ]), ]), - h('div.fa.fa-slack', [ - h('a.info', { - href: 'http://slack.metamask.io', - target: '_blank', - }, 'Join the conversation on Slack'), - ]), - h('div', [ h('.fa.fa-twitter', [ h('a.info', { |