aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/app/accounts/account-list-item.js2
-rw-r--r--ui/app/accounts/index.js8
-rw-r--r--ui/app/actions.js18
-rw-r--r--ui/app/components/buy-button-subview.js4
-rw-r--r--ui/app/components/pending-msg-details.js2
-rw-r--r--ui/app/components/pending-tx-details.js2
-rw-r--r--ui/app/conf-tx.js8
-rw-r--r--ui/app/first-time/init-menu.js2
-rw-r--r--ui/app/reducers/app.js2
-rw-r--r--ui/app/reducers/metamask.js1
-rw-r--r--ui/example.js8
-rw-r--r--ui/lib/account-link.js6
12 files changed, 32 insertions, 31 deletions
diff --git a/ui/app/accounts/account-list-item.js b/ui/app/accounts/account-list-item.js
index 4e0d69ed7..ef7b749e4 100644
--- a/ui/app/accounts/account-list-item.js
+++ b/ui/app/accounts/account-list-item.js
@@ -16,7 +16,7 @@ function AccountListItem () {
AccountListItem.prototype.render = function () {
const identity = this.props.identity
- var isSelected = this.props.selectedAddress === identity.address
+ var isSelected = this.props.selectedAccount === identity.address
var account = this.props.accounts[identity.address]
const selectedClass = isSelected ? '.selected' : ''
diff --git a/ui/app/accounts/index.js b/ui/app/accounts/index.js
index 2e8321a77..fcb3a7b0f 100644
--- a/ui/app/accounts/index.js
+++ b/ui/app/accounts/index.js
@@ -19,7 +19,7 @@ function mapStateToProps (state) {
accounts: state.metamask.accounts,
identities: state.metamask.identities,
unconfTxs: state.metamask.unconfTxs,
- selectedAddress: state.metamask.selectedAddress,
+ selectedAccount: state.metamask.selectedAccount,
scrollToBottom: state.appState.scrollToBottom,
pending,
}
@@ -72,7 +72,7 @@ AccountsScreen.prototype.render = function () {
return h(AccountListItem, {
key: `acct-panel-${identity.address}`,
identity,
- selectedAddress: this.props.selectedAddress,
+ selectedAccount: this.props.selectedAccount,
accounts: this.props.accounts,
onShowDetail: this.onShowDetail.bind(this),
pending,
@@ -133,8 +133,8 @@ AccountsScreen.prototype.navigateToConfTx = function () {
AccountsScreen.prototype.onSelect = function (address, event) {
event.stopPropagation()
// if already selected, deselect
- if (this.props.selectedAddress === address) address = null
- this.props.dispatch(actions.setSelectedAddress(address))
+ if (this.props.selectedAccount === address) address = null
+ this.props.dispatch(actions.setSelectedAccount(address))
}
AccountsScreen.prototype.onShowDetail = function (address, event) {
diff --git a/ui/app/actions.js b/ui/app/actions.js
index e69b743e9..e78cf8a51 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -71,7 +71,7 @@ var actions = {
TRANSACTION_ERROR: 'TRANSACTION_ERROR',
NEXT_TX: 'NEXT_TX',
PREVIOUS_TX: 'PREV_TX',
- setSelectedAddress: setSelectedAddress,
+ setSelectedAccount: setSelectedAccount,
signMsg: signMsg,
cancelMsg: cancelMsg,
sendTx: sendTx,
@@ -201,9 +201,9 @@ function createNewVaultAndRestore (password, seed) {
}
}
-function createNewVaultAndKeychain (password, entropy) {
+function createNewVaultAndKeychain (password) {
return (dispatch) => {
- background.createNewVaultAndKeychain(password, entropy, (err) => {
+ background.createNewVaultAndKeychain(password, (err) => {
if (err) {
return dispatch(actions.showWarning(err.message))
}
@@ -221,9 +221,11 @@ function requestRevealSeed (password) {
return (dispatch) => {
dispatch(actions.showLoadingIndication())
background.submitPassword(password, (err) => {
- dispatch(actions.hideLoadingIndication())
if (err) return dispatch(actions.displayWarning(err.message))
- background.placeSeedWords()
+ background.placeSeedWords((err) => {
+ if (err) return dispatch(actions.displayWarning(err.message))
+ dispatch(actions.hideLoadingIndication())
+ })
})
}
}
@@ -259,9 +261,9 @@ function showInfoPage () {
}
}
-function setSelectedAddress (address) {
+function setSelectedAccount (address) {
return (dispatch) => {
- background.setSelectedAddress(address)
+ background.setSelectedAccount(address)
}
}
@@ -455,7 +457,7 @@ function lockMetamask () {
function showAccountDetail (address) {
return (dispatch) => {
dispatch(actions.showLoadingIndication())
- background.setSelectedAddress(address, (err, address) => {
+ background.setSelectedAccount(address, (err, address) => {
dispatch(actions.hideLoadingIndication())
if (err) {
return dispatch(actions.displayWarning(err.message))
diff --git a/ui/app/components/buy-button-subview.js b/ui/app/components/buy-button-subview.js
index b564733b1..0dd8c4946 100644
--- a/ui/app/components/buy-button-subview.js
+++ b/ui/app/components/buy-button-subview.js
@@ -114,8 +114,8 @@ BuyButtonSubview.prototype.formVersionSubview = function () {
width: '225px',
},
}, 'In order to access this feature please switch to the Main Network'),
- h('h3.text-transform-uppercase', 'or:'),
- this.props.network === '2' ? h('button.text-transform-uppercase', {
+ this.props.network === '3' ? h('h3.text-transform-uppercase', 'or:') : null,
+ this.props.network === '3' ? h('button.text-transform-uppercase', {
onClick: () => this.props.dispatch(actions.buyEth()),
style: {
marginTop: '15px',
diff --git a/ui/app/components/pending-msg-details.js b/ui/app/components/pending-msg-details.js
index 16308d121..404cb8ae2 100644
--- a/ui/app/components/pending-msg-details.js
+++ b/ui/app/components/pending-msg-details.js
@@ -16,7 +16,7 @@ PendingMsgDetails.prototype.render = function () {
var msgData = state.txData
var msgParams = msgData.msgParams || {}
- var address = msgParams.from || state.selectedAddress
+ var address = msgParams.from || state.selectedAccount
var identity = state.identities[address] || { address: address }
var account = state.accounts[address] || { address: address }
diff --git a/ui/app/components/pending-tx-details.js b/ui/app/components/pending-tx-details.js
index 545302098..42fb4c870 100644
--- a/ui/app/components/pending-tx-details.js
+++ b/ui/app/components/pending-tx-details.js
@@ -24,7 +24,7 @@ PTXP.render = function () {
var txData = props.txData
var txParams = txData.txParams || {}
- var address = txParams.from || props.selectedAddress
+ var address = txParams.from || props.selectedAccount
var identity = props.identities[address] || { address: address }
var account = props.accounts[address]
var balance = account ? account.balance : '0x0'
diff --git a/ui/app/conf-tx.js b/ui/app/conf-tx.js
index 8d23adfe5..0b1dcac45 100644
--- a/ui/app/conf-tx.js
+++ b/ui/app/conf-tx.js
@@ -18,7 +18,7 @@ function mapStateToProps (state) {
return {
identities: state.metamask.identities,
accounts: state.metamask.accounts,
- selectedAddress: state.metamask.selectedAddress,
+ selectedAccount: state.metamask.selectedAccount,
unconfTxs: state.metamask.unconfTxs,
unconfMsgs: state.metamask.unconfMsgs,
index: state.appState.currentView.context,
@@ -90,12 +90,12 @@ ConfirmTxScreen.prototype.render = function () {
// Properties
txData: txData,
key: txData.id,
- selectedAddress: state.selectedAddress,
+ selectedAccount: state.selectedAccount,
accounts: state.accounts,
identities: state.identities,
insufficientBalance: this.checkBalnceAgainstTx(txData),
// Actions
- buyEth: this.buyEth.bind(this, txParams.from || state.selectedAddress),
+ buyEth: this.buyEth.bind(this, txParams.from || state.selectedAccount),
sendTransaction: this.sendTransaction.bind(this, txData),
cancelTransaction: this.cancelTransaction.bind(this, txData),
signMessage: this.signMessage.bind(this, txData),
@@ -120,7 +120,7 @@ ConfirmTxScreen.prototype.checkBalnceAgainstTx = function (txData) {
var state = this.props
var txParams = txData.txParams || {}
- var address = txParams.from || state.selectedAddress
+ var address = txParams.from || state.selectedAccount
var account = state.accounts[address]
var balance = account ? account.balance : '0x0'
diff --git a/ui/app/first-time/init-menu.js b/ui/app/first-time/init-menu.js
index 14a89b988..6ceee6784 100644
--- a/ui/app/first-time/init-menu.js
+++ b/ui/app/first-time/init-menu.js
@@ -165,7 +165,7 @@ InitializeMenuScreen.prototype.createNewVaultAndKeychain = function () {
return
}
- this.props.dispatch(actions.createNewVaultAndKeychain(password, ''/* entropy*/))
+ this.props.dispatch(actions.createNewVaultAndKeychain(password))
}
InitializeMenuScreen.prototype.inputChanged = function (event) {
diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js
index ca450fd89..27d84d8a6 100644
--- a/ui/app/reducers/app.js
+++ b/ui/app/reducers/app.js
@@ -285,7 +285,7 @@ function reduceApp (state, action) {
warning: null,
currentView: {
name: 'accountDetail',
- context: state.metamask.selectedAddress,
+ context: state.metamask.selectedAccount,
},
accountDetail: {
subview: 'transactions',
diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js
index 82904dcc6..1a4514a21 100644
--- a/ui/app/reducers/metamask.js
+++ b/ui/app/reducers/metamask.js
@@ -98,7 +98,6 @@ function reduceMetamask (state, action) {
isUnlocked: true,
isInitialized: true,
selectedAccount: action.value,
- selectedAddress: action.value,
})
delete newState.seedWords
return newState
diff --git a/ui/example.js b/ui/example.js
index f4126438c..888748c48 100644
--- a/ui/example.js
+++ b/ui/example.js
@@ -53,14 +53,14 @@ function addUnconfTx (txParams) {
}
var isUnlocked = false
-var selectedAddress = null
+var selectedAccount = null
function getState () {
return {
isUnlocked: isUnlocked,
identities: isUnlocked ? identities : {},
unconfTxs: isUnlocked ? unconfTxs : {},
- selectedAddress: selectedAddress,
+ selectedAccount: selectedAccount,
}
}
@@ -85,8 +85,8 @@ accountManager.submitPassword = function (password, cb) {
}
}
-accountManager.setSelectedAddress = function (address, cb) {
- selectedAddress = address
+accountManager.setSelectedAccount = function (address, cb) {
+ selectedAccount = address
cb(null, getState())
this._didUpdate()
}
diff --git a/ui/lib/account-link.js b/ui/lib/account-link.js
index a29ba5e69..ff52d9c54 100644
--- a/ui/lib/account-link.js
+++ b/ui/lib/account-link.js
@@ -1,4 +1,4 @@
-module.exports = function (address, network) {
+module.exports = function(address, network) {
const net = parseInt(network)
let link
@@ -7,10 +7,10 @@ module.exports = function (address, network) {
link = `http://etherscan.io/address/${address}`
break
case 2: // morden test net
- link = `http://testnet.etherscan.io/address/${address}`
+ link = `http://morden.etherscan.io/address/${address}`
break
case 3: // ropsten test net
- link = ''
+ link = `http://testnet.etherscan.io/address/${address}`
break
default:
link = ''