diff options
Diffstat (limited to 'ui/app')
-rw-r--r-- | ui/app/actions.js | 16 | ||||
-rw-r--r-- | ui/app/app.js | 1 | ||||
-rw-r--r-- | ui/app/components/transaction-list-item.js | 28 | ||||
-rw-r--r-- | ui/app/info.js | 7 |
4 files changed, 31 insertions, 21 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index 630b6390c..7b0b0d9c5 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -145,8 +145,6 @@ var actions = { SET_RPC_TARGET: 'SET_RPC_TARGET', SET_DEFAULT_RPC_TARGET: 'SET_DEFAULT_RPC_TARGET', SET_PROVIDER_TYPE: 'SET_PROVIDER_TYPE', - USE_ETHERSCAN_PROVIDER: 'USE_ETHERSCAN_PROVIDER', - useEtherscanProvider: useEtherscanProvider, showConfigPage, SHOW_ADD_TOKEN_PAGE: 'SHOW_ADD_TOKEN_PAGE', showAddTokenPage, @@ -156,7 +154,6 @@ var actions = { updateTokens, UPDATE_TOKENS: 'UPDATE_TOKENS', setRpcTarget: setRpcTarget, - setDefaultRpcTarget: setDefaultRpcTarget, setProviderType: setProviderType, // loading overlay SHOW_LOADING: 'SHOW_LOADING_INDICATION', @@ -864,16 +861,19 @@ function markAccountsFound () { // config // -// default rpc target refers to localhost:8545 in this instance. -function setDefaultRpcTarget () { - log.debug(`background.setDefaultRpcTarget`) +function setProviderType (type) { return (dispatch) => { - background.setDefaultRpc((err, result) => { + log.debug(`background.setProviderType`) + background.setProviderType(type, (err, result) => { if (err) { log.error(err) - return dispatch(self.displayWarning('Had a problem changing networks.')) + return dispatch(self.displayWarning('Had a problem changing networks!')) } }) + return { + type: actions.SET_PROVIDER_TYPE, + value: type, + } } } diff --git a/ui/app/app.js b/ui/app/app.js index 583497cb3..f1a671ab1 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -254,6 +254,7 @@ App.prototype.renderAppBar = function () { ) } + App.prototype.renderBackButton = function (style, justArrow = false) { var props = this.props return ( diff --git a/ui/app/components/transaction-list-item.js b/ui/app/components/transaction-list-item.js index a40066dc7..3ea466d24 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,8 +141,11 @@ 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) { @@ -152,14 +155,27 @@ function failIfFailed (transaction) { 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', { |