aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components')
-rw-r--r--ui/app/components/account-dropdowns.js11
-rw-r--r--ui/app/components/pending-msg-details.js2
-rw-r--r--ui/app/components/pending-msg.js5
-rw-r--r--ui/app/components/token-list.js47
-rw-r--r--ui/app/components/transaction-list-item.js11
5 files changed, 36 insertions, 40 deletions
diff --git a/ui/app/components/account-dropdowns.js b/ui/app/components/account-dropdowns.js
index 9a68b8f20..c23f61c98 100644
--- a/ui/app/components/account-dropdowns.js
+++ b/ui/app/components/account-dropdowns.js
@@ -59,7 +59,16 @@ class AccountDropdowns extends Component {
},
),
this.indicateIfLoose(keyring.type),
- h('span', { style: { marginLeft: '20px', fontSize: '24px' } }, identity.name || ''),
+ h('span', {
+ style: {
+ marginLeft: '20px',
+ fontSize: '24px',
+ maxWidth: '145px',
+ whiteSpace: 'nowrap',
+ overflow: 'hidden',
+ textOverflow: 'ellipsis',
+ },
+ }, identity.name || ''),
h('span', { style: { marginLeft: '20px', fontSize: '24px' } }, isSelected ? h('.check', '✓') : null),
]
)
diff --git a/ui/app/components/pending-msg-details.js b/ui/app/components/pending-msg-details.js
index 16308d121..718a22de0 100644
--- a/ui/app/components/pending-msg-details.js
+++ b/ui/app/components/pending-msg-details.js
@@ -38,7 +38,7 @@ PendingMsgDetails.prototype.render = function () {
// message data
h('.tx-data.flex-column.flex-justify-center.flex-grow.select-none', [
- h('.flex-row.flex-space-between', [
+ h('.flex-column.flex-space-between', [
h('label.font-small', 'MESSAGE'),
h('span.font-small', msgParams.data),
]),
diff --git a/ui/app/components/pending-msg.js b/ui/app/components/pending-msg.js
index b2cac164a..b7133cda8 100644
--- a/ui/app/components/pending-msg.js
+++ b/ui/app/components/pending-msg.js
@@ -18,6 +18,9 @@ PendingMsg.prototype.render = function () {
h('div', {
key: msgData.id,
+ style: {
+ maxWidth: '350px',
+ },
}, [
// header
@@ -35,7 +38,7 @@ PendingMsg.prototype.render = function () {
}, `Signing this message can have
dangerous side effects. Only sign messages from
sites you fully trust with your entire account.
- This will be fixed in a future version.`),
+ This dangerous method will be removed in a future version.`),
// message details
h(PendingTxDetails, state),
diff --git a/ui/app/components/token-list.js b/ui/app/components/token-list.js
index 5ea31ae8d..998ec901d 100644
--- a/ui/app/components/token-list.js
+++ b/ui/app/components/token-list.js
@@ -3,17 +3,6 @@ const h = require('react-hyperscript')
const inherits = require('util').inherits
const TokenTracker = require('eth-token-tracker')
const TokenCell = require('./token-cell.js')
-const normalizeAddress = require('eth-sig-util').normalize
-
-const defaultTokens = []
-const contracts = require('eth-contract-metadata')
-for (const address in contracts) {
- const contract = contracts[address]
- if (contract.erc20) {
- contract.address = address
- defaultTokens.push(contract)
- }
-}
module.exports = TokenList
@@ -38,7 +27,24 @@ TokenList.prototype.render = function () {
if (error) {
log.error(error)
- return this.message('There was a problem loading your token balances.')
+ return h('.hotFix', {
+ style: {
+ padding: '80px',
+ },
+ }, [
+ 'We had trouble loading your token balances. You can view them ',
+ h('span.hotFix', {
+ style: {
+ color: 'rgba(247, 134, 28, 1)',
+ cursor: 'pointer',
+ },
+ onClick: () => {
+ global.platform.openWindow({
+ url: `https://ethplorer.io/address/${userAddress}`,
+ })
+ },
+ }, 'here'),
+ ])
}
const tokenViews = tokens.map((tokenData) => {
@@ -89,7 +95,7 @@ TokenList.prototype.renderTokenStatusBar = function () {
let msg
if (tokens.length === 1) {
msg = `You own 1 token`
- } else if (tokens.length === 1) {
+ } else if (tokens.length > 1) {
msg = `You own ${tokens.length} tokens`
} else {
msg = `No tokens found`
@@ -153,7 +159,7 @@ TokenList.prototype.createFreshTokenTracker = function () {
this.tracker = new TokenTracker({
userAddress,
provider: global.ethereumProvider,
- tokens: uniqueMergeTokens(defaultTokens, this.props.tokens),
+ tokens: this.props.tokens,
pollingInterval: 8000,
})
@@ -199,16 +205,3 @@ TokenList.prototype.componentWillUnmount = function () {
this.tracker.stop()
}
-function uniqueMergeTokens (tokensA, tokensB) {
- const uniqueAddresses = []
- const result = []
- tokensA.concat(tokensB).forEach((token) => {
- const normal = normalizeAddress(token.address)
- if (!uniqueAddresses.includes(normal)) {
- uniqueAddresses.push(normal)
- result.push(token)
- }
- })
- return result
-}
-
diff --git a/ui/app/components/transaction-list-item.js b/ui/app/components/transaction-list-item.js
index 9018bab06..5d5d0bcc5 100644
--- a/ui/app/components/transaction-list-item.js
+++ b/ui/app/components/transaction-list-item.js
@@ -60,16 +60,7 @@ TransactionListItem.prototype.render = function () {
}, [
h('.identicon-wrapper.flex-column.flex-center.select-none', [
- h('.pop-hover', {
- onClick: (event) => {
- event.stopPropagation()
- if (!isTx || isPending) return
- var url = `https://metamask.github.io/eth-tx-viz/?tx=${transaction.hash}`
- global.platform.openWindow({ url })
- },
- }, [
- h(TransactionIcon, { txParams, transaction, isTx, isMsg }),
- ]),
+ h(TransactionIcon, { txParams, transaction, isTx, isMsg }),
]),
h(Tooltip, {