aboutsummaryrefslogtreecommitdiffstats
path: root/old-ui/app
diff options
context:
space:
mode:
Diffstat (limited to 'old-ui/app')
-rw-r--r--old-ui/app/account-detail.js35
-rw-r--r--old-ui/app/app.js19
-rw-r--r--old-ui/app/components/pending-tx.js12
-rw-r--r--old-ui/app/conf-tx.js6
-rw-r--r--old-ui/app/config.js2
-rw-r--r--old-ui/app/css/index.css13
-rw-r--r--old-ui/app/send.js18
7 files changed, 76 insertions, 29 deletions
diff --git a/old-ui/app/account-detail.js b/old-ui/app/account-detail.js
index ee7eb1258..692d50491 100644
--- a/old-ui/app/account-detail.js
+++ b/old-ui/app/account-detail.js
@@ -78,9 +78,10 @@ AccountDetailScreen.prototype.render = function () {
address: selected,
}),
]),
- h('div.flex-column', {
+ h('flex-column', {
style: {
lineHeight: '10px',
+ marginLeft: '15px',
width: '100%',
},
}, [
@@ -101,7 +102,7 @@ AccountDetailScreen.prototype.render = function () {
{
style: {
display: 'flex',
- justifyContent: 'space-between',
+ justifyContent: 'flex-start',
alignItems: 'center',
},
},
@@ -131,6 +132,8 @@ AccountDetailScreen.prototype.render = function () {
AccountDropdowns,
{
style: {
+ marginRight: '8px',
+ marginLeft: 'auto',
cursor: 'pointer',
},
selected,
@@ -144,6 +147,7 @@ AccountDetailScreen.prototype.render = function () {
]),
h('.flex-row', {
style: {
+ width: '15em',
justifyContent: 'space-between',
alignItems: 'baseline',
},
@@ -157,10 +161,10 @@ AccountDetailScreen.prototype.render = function () {
textOverflow: 'ellipsis',
paddingTop: '3px',
width: '5em',
+ height: '15px',
fontSize: '13px',
fontFamily: 'Montserrat Light',
textRendering: 'geometricPrecision',
- marginTop: '15px',
marginBottom: '15px',
color: '#AEAEAE',
},
@@ -188,21 +192,20 @@ AccountDetailScreen.prototype.render = function () {
},
}),
- h('div', {}, [
+ h('.flex-grow'),
- h('button', {
- onClick: () => props.dispatch(actions.buyEthView(selected)),
- style: { marginRight: '10px' },
- }, 'BUY'),
+ h('button', {
+ onClick: () => props.dispatch(actions.buyEthView(selected)),
+ style: { marginRight: '10px' },
+ }, 'BUY'),
- h('button', {
- onClick: () => props.dispatch(actions.showSendPage()),
- style: {
- marginBottom: '20px',
- },
- }, 'SEND'),
-
- ]),
+ h('button', {
+ onClick: () => props.dispatch(actions.showSendPage()),
+ style: {
+ marginBottom: '20px',
+ marginRight: '8px',
+ },
+ }, 'SEND'),
]),
]),
diff --git a/old-ui/app/app.js b/old-ui/app/app.js
index 7a380396e..6eb1e487f 100644
--- a/old-ui/app/app.js
+++ b/old-ui/app/app.js
@@ -34,6 +34,7 @@ const HDCreateVaultComplete = require('./keychains/hd/create-vault-complete')
const HDRestoreVaultScreen = require('./keychains/hd/restore-vault')
const RevealSeedConfirmation = require('./keychains/hd/recover-seed/confirmation')
const AccountDropdowns = require('./components/account-dropdowns').AccountDropdowns
+const { BETA_UI_NETWORK_TYPE } = require('../../app/scripts/config').enums
module.exports = connect(mapStateToProps)(App)
@@ -396,7 +397,7 @@ App.prototype.renderDropdown = function () {
h(DropdownMenuItem, {
closeMenu: () => this.setState({ isMainMenuOpen: !isOpen }),
onClick: () => { this.props.dispatch(actions.lockMetamask()) },
- }, 'Lock'),
+ }, 'Log Out'),
h(DropdownMenuItem, {
closeMenu: () => this.setState({ isMainMenuOpen: !isOpen }),
@@ -405,7 +406,10 @@ App.prototype.renderDropdown = function () {
h(DropdownMenuItem, {
closeMenu: () => this.setState({ isMainMenuOpen: !isOpen }),
- onClick: () => { this.props.dispatch(actions.setFeatureFlag('betaUI', true)) },
+ onClick: () => {
+ this.props.dispatch(actions.setFeatureFlag('betaUI', true, 'BETA_UI_NOTIFICATION_MODAL'))
+ .then(() => this.props.dispatch(actions.setNetworkEndpoints(BETA_UI_NETWORK_TYPE)))
+ },
}, 'Try Beta!'),
])
}
@@ -466,11 +470,6 @@ App.prototype.renderPrimary = function () {
})
}
- if (props.seedWords) {
- log.debug('rendering seed words')
- return h(HDCreateVaultComplete, {key: 'HDCreateVaultComplete'})
- }
-
// show initialize screen
if (!props.isInitialized || props.forgottenPassword) {
// show current view
@@ -505,6 +504,12 @@ App.prototype.renderPrimary = function () {
}
}
+ // show seed words screen
+ if (props.seedWords) {
+ log.debug('rendering seed words')
+ return h(HDCreateVaultComplete, {key: 'HDCreateVaultComplete'})
+ }
+
// show current view
switch (props.currentView.name) {
diff --git a/old-ui/app/components/pending-tx.js b/old-ui/app/components/pending-tx.js
index 366121ce0..10208b5ce 100644
--- a/old-ui/app/components/pending-tx.js
+++ b/old-ui/app/components/pending-tx.js
@@ -38,6 +38,16 @@ PendingTx.prototype.render = function () {
const txMeta = this.gatherTxMeta()
const txParams = txMeta.txParams || {}
+ // Allow retry txs
+ const { lastGasPrice } = txMeta
+ let forceGasMin
+ if (lastGasPrice) {
+ const stripped = ethUtil.stripHexPrefix(lastGasPrice)
+ const lastGas = new BN(stripped, 16)
+ const priceBump = lastGas.divn('10')
+ forceGasMin = lastGas.add(priceBump)
+ }
+
// Account Details
const address = txParams.from || props.selectedAddress
const identity = props.identities[address] || { address: address }
@@ -199,7 +209,7 @@ PendingTx.prototype.render = function () {
precision: 9,
scale: 9,
suffix: 'GWEI',
- min: MIN_GAS_PRICE_BN,
+ min: forceGasMin || MIN_GAS_PRICE_BN,
style: {
position: 'relative',
top: '5px',
diff --git a/old-ui/app/conf-tx.js b/old-ui/app/conf-tx.js
index 15c937b1c..5e2ae9e78 100644
--- a/old-ui/app/conf-tx.js
+++ b/old-ui/app/conf-tx.js
@@ -4,6 +4,7 @@ const h = require('react-hyperscript')
const connect = require('react-redux').connect
const actions = require('../../ui/app/actions')
const NetworkIndicator = require('./components/network')
+const LoadingIndicator = require('./components/loading')
const txHelper = require('../lib/tx-helper')
const isPopupOrNotification = require('../../app/scripts/lib/is-popup-or-notification')
@@ -60,6 +61,11 @@ ConfirmTxScreen.prototype.render = function () {
h('.flex-column.flex-grow', [
+ h(LoadingIndicator, {
+ isLoading: txData.loadingDefaults,
+ loadingMessage: 'Estimating transaction cost…',
+ }),
+
// subtitle and nav
h('.section-title.flex-row.flex-center', [
!isNotification ? h('i.fa.fa-arrow-left.fa-lg.cursor-pointer', {
diff --git a/old-ui/app/config.js b/old-ui/app/config.js
index acd101947..75198fba5 100644
--- a/old-ui/app/config.js
+++ b/old-ui/app/config.js
@@ -119,7 +119,7 @@ ConfigScreen.prototype.render = function () {
if (err) {
state.dispatch(actions.displayWarning('Error in retrieving state logs.'))
} else {
- exportAsFile('MetaMask State Logs', result)
+ exportAsFile('MetaMask State Logs.json', result)
}
})
},
diff --git a/old-ui/app/css/index.css b/old-ui/app/css/index.css
index 1dcda897b..3bb64647a 100644
--- a/old-ui/app/css/index.css
+++ b/old-ui/app/css/index.css
@@ -21,6 +21,7 @@ html, body {
background: #F7F7F7;
margin: 0;
padding: 0;
+ height: 100%;
}
html {
@@ -107,6 +108,10 @@ button:not([disabled]):active, input[type="submit"]:not([disabled]):active {
transform: scale(0.95);
}
+.grow-on-hover:hover {
+ transform: scale(1.05);
+}
+
a {
text-decoration: none;
color: inherit;
@@ -436,12 +441,14 @@ input.large-input {
.account-detail-section {
display: flex;
flex-wrap: wrap;
+ overflow-x: hidden;
overflow-y: auto;
+ max-height: 465px;
flex-direction: inherit;
+}
- .name-label {
- margin-left: 15px;
- }
+.account-detail-section .name-label {
+ margin-left: 15px;
}
.grow-tenx {
diff --git a/old-ui/app/send.js b/old-ui/app/send.js
index 9ab064aea..b40910236 100644
--- a/old-ui/app/send.js
+++ b/old-ui/app/send.js
@@ -247,10 +247,26 @@ SendTransactionScreen.prototype.onSubmit = function () {
const recipient = state.recipient || document.querySelector('input[name="address"]').value.replace(/^[.\s]+|[.\s]+$/g, '')
const nickname = state.nickname || ' '
const input = document.querySelector('input[name="amount"]').value
+ const parts = input.split('')
+
+ let message
+
+ if (isNaN(input) || input === '') {
+ message = 'Invalid ether value.'
+ return this.props.dispatch(actions.displayWarning(message))
+ }
+
+ if (parts[1]) {
+ var decimal = parts[1]
+ if (decimal.length > 18) {
+ message = 'Ether amount is too precise.'
+ return this.props.dispatch(actions.displayWarning(message))
+ }
+ }
+
const value = util.normalizeEthStringToWei(input)
const txData = document.querySelector('input[name="txData"]').value
const balance = this.props.balance
- let message
if (value.gt(balance)) {
message = 'Insufficient funds.'