aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md7
-rw-r--r--app/manifest.json2
-rw-r--r--app/scripts/lib/idStore.js6
-rw-r--r--library/README.md20
-rw-r--r--library/example/index.js2
-rw-r--r--library/index.js5
-rw-r--r--library/server.js9
-rw-r--r--package.json3
-rw-r--r--ui/app/actions.js2
-rw-r--r--ui/app/app.js15
-rw-r--r--ui/app/components/drop-menu-item.js2
-rw-r--r--ui/app/components/network.js3
-rw-r--r--ui/app/first-time/init-menu.js18
13 files changed, 59 insertions, 35 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f2c442050..9c6a06788 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,7 +2,14 @@
## Current Master
+## 2.13.6 2016-10-26
+
- Add a check for improper Transaction data.
+- Inject up to date version of web3.js
+- Now nicknaming new accounts "Account #" instead of "Wallet #" for clarity.
+- Fix bug where custom provider selection could show duplicate items.
+- Fix bug where connecting to a local morden node would make two providers appear selected.
+- Fix bug that was sometimes preventing transactions from being sent.
## 2.13.5 2016-10-18
diff --git a/app/manifest.json b/app/manifest.json
index 8f5a34ea6..e35f2918d 100644
--- a/app/manifest.json
+++ b/app/manifest.json
@@ -1,7 +1,7 @@
{
"name": "MetaMask",
"short_name": "Metamask",
- "version": "2.13.5",
+ "version": "2.13.6",
"manifest_version": 2,
"author": "https://metamask.io",
"description": "Ethereum Browser Extension",
diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js
index 8ee2b62dd..c566907b9 100644
--- a/app/scripts/lib/idStore.js
+++ b/app/scripts/lib/idStore.js
@@ -245,9 +245,9 @@ IdentityStore.prototype.addUnconfirmedTransaction = function (txParams, onTxDone
// perform static analyis on the target contract code
function analyzeForDelegateCall(cb){
if (txParams.to) {
- query.getCode(txParams.to, function (err, result) {
+ query.getCode(txParams.to, (err, result) => {
if (err) return cb(err)
- var containsDelegateCall = this.checkForDelegateCall(result)
+ var containsDelegateCall = self.checkForDelegateCall(result)
txData.containsDelegateCall = containsDelegateCall
cb()
})
@@ -426,7 +426,7 @@ IdentityStore.prototype._loadIdentities = function () {
this._ethStore.addAccount(ethUtil.addHexPrefix(address))
}
// add to identities
- const defaultLabel = 'Wallet ' + (i + 1)
+ const defaultLabel = 'Account ' + (i + 1)
const nickname = configManager.nicknameForWallet(address)
var identity = {
name: nickname || defaultLabel,
diff --git a/library/README.md b/library/README.md
index 7dc291564..6a6574dbd 100644
--- a/library/README.md
+++ b/library/README.md
@@ -3,4 +3,22 @@ start the dual servers (dapp + mascara)
node server.js
```
-open the example dapp at `http://localhost:9002/` \ No newline at end of file
+open the example dapp at `http://localhost:9002/`
+
+*You will need to build MetaMask in order for this to work*
+```
+gulp dev
+```
+to build MetaMask and have it live reload if you make changes
+
+
+## First time use:
+
+- navigate to: http://127.0.0.1:9001/popup/popup.html
+- Create an Account
+- go back to http://localhost:9002/
+- open devTools
+- click Sync Tx
+
+### Todos
+- Look into using [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API)
diff --git a/library/example/index.js b/library/example/index.js
index b23c15307..4a107df6a 100644
--- a/library/example/index.js
+++ b/library/example/index.js
@@ -17,7 +17,7 @@ function startApp(){
console.log('getting main account...')
web3.eth.getAccounts(function(err, addresses){
if (err) throw err
- console.log('set address')
+ console.log('set address', addresses[0])
primaryAccount = addresses[0]
})
diff --git a/library/index.js b/library/index.js
index ab341f1f8..b5f4f6637 100644
--- a/library/index.js
+++ b/library/index.js
@@ -4,7 +4,6 @@ const setupProvider = require('./lib/setup-provider.js')
//
// setup web3
//
-
var provider = setupProvider()
hijackProvider(provider)
var web3 = new Web3(provider)
@@ -27,7 +26,7 @@ var shouldPop = false
window.addEventListener('click', function(){
if (!shouldPop) return
shouldPop = false
- window.open('http://127.0.0.1:9001/popup/popup.html', '', 'width=1000')
+ window.open('http://127.0.0.1:9001/popup/popup.html', '', 'width=360 height=500')
console.log('opening window...')
})
@@ -41,4 +40,4 @@ function hijackProvider(provider){
}
_super(payload, cb)
}
-} \ No newline at end of file
+}
diff --git a/library/server.js b/library/server.js
index bb0b24e50..797ad8a77 100644
--- a/library/server.js
+++ b/library/server.js
@@ -80,15 +80,6 @@ function createBundle(entryPoint){
plugin: [watchify],
})
- // global transpile
- var bablePreset = require.resolve('babel-preset-es2015')
-
- bundler.transform(babelify, {
- global: true,
- presets: [bablePreset],
- babelrc: false,
- })
-
bundler.on('update', bundle)
bundle()
diff --git a/package.json b/package.json
index ab8dae526..b1f1a9242 100644
--- a/package.json
+++ b/package.json
@@ -85,14 +85,13 @@
"three.js": "^0.73.2",
"through2": "^2.0.1",
"vreme": "^3.0.2",
- "web3": "ethereum/web3.js#260ac6e78a8ce4b2e13f5bb0fdb65f4088585876",
+ "web3": "0.17.0-beta",
"web3-provider-engine": "^8.1.5",
"web3-stream-provider": "^2.0.6",
"xtend": "^4.0.1"
},
"devDependencies": {
"babel-eslint": "^6.0.5",
- "babel-preset-es2015": "^6.6.0",
"babel-register": "^6.7.2",
"babelify": "^7.2.0",
"beefy": "^2.1.5",
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 3ae3a623d..a2f59cb3c 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -174,7 +174,7 @@ function tryUnlockMetamask (password) {
function createNewVault (password, entropy) {
return (dispatch) => {
- dispatch(actions.createNewVaultInProgress())
+ // dispatch(actions.createNewVaultInProgress())
background.createNewVault(password, entropy, (err, newState) => {
if (err) {
return dispatch(actions.showWarning(err.message))
diff --git a/ui/app/app.js b/ui/app/app.js
index 061545d59..588aa9896 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -236,6 +236,7 @@ App.prototype.renderNetworkDropdown = function () {
action: () => props.dispatch(actions.setProviderType('testnet')),
icon: h('.menu-icon.red-dot'),
activeNetworkRender: props.network,
+ provider: props.provider,
}),
h(DropMenuItem, {
@@ -246,13 +247,6 @@ App.prototype.renderNetworkDropdown = function () {
activeNetworkRender: props.provider.rpcTarget,
}),
- h(DropMenuItem, {
- label: 'Custom RPC',
- closeMenu: () => this.setState({ isNetworkMenuOpen: false }),
- action: () => this.props.dispatch(actions.showConfigPage()),
- icon: h('i.fa.fa-question-circle.fa-lg'),
- }),
-
this.renderCustomOption(props.provider.rpcTarget),
])
}
@@ -493,7 +487,12 @@ App.prototype.toggleMetamaskActive = function () {
App.prototype.renderCustomOption = function (rpcTarget) {
switch (rpcTarget) {
case undefined:
- return null
+ return h(DropMenuItem, {
+ label: 'Custom RPC',
+ closeMenu: () => this.setState({ isNetworkMenuOpen: false }),
+ action: () => this.props.dispatch(actions.showConfigPage()),
+ icon: h('i.fa.fa-question-circle.fa-lg'),
+ })
case 'http://localhost:8545':
return null
diff --git a/ui/app/components/drop-menu-item.js b/ui/app/components/drop-menu-item.js
index 0ca1988c6..8088680c0 100644
--- a/ui/app/components/drop-menu-item.js
+++ b/ui/app/components/drop-menu-item.js
@@ -42,7 +42,7 @@ DropMenuItem.prototype.activeNetworkRender = function () {
if (providerType === 'mainnet') return h('.check', '✓')
break
case 'Morden Test Network':
- if (activeNetwork === '2') return h('.check', '✓')
+ if (provider.type === 'testnet') return h('.check', '✓')
break
case 'Localhost 8545':
if (activeNetwork === 'http://localhost:8545') return h('.check', '✓')
diff --git a/ui/app/components/network.js b/ui/app/components/network.js
index 845861396..ff5aefd41 100644
--- a/ui/app/components/network.js
+++ b/ui/app/components/network.js
@@ -36,13 +36,14 @@ Network.prototype.render = function () {
} else if (providerName === 'mainnet') {
hoverText = 'Main Ethereum Network'
iconName = 'ethereum-network'
- } else if (parseInt(networkNumber) === 2) {
+ } else if (providerName === 'testnet') {
hoverText = 'Morden Test Network'
iconName = 'morden-test-network'
} else {
hoverText = 'Unknown Private Network'
iconName = 'unknown-private-network'
}
+
return (
h('#network_component.flex-center.pointer', {
style: {
diff --git a/ui/app/first-time/init-menu.js b/ui/app/first-time/init-menu.js
index 9788db382..b1155e2f6 100644
--- a/ui/app/first-time/init-menu.js
+++ b/ui/app/first-time/init-menu.js
@@ -20,6 +20,7 @@ function mapStateToProps (state) {
return {
// state from plugin
currentView: state.appState.currentView,
+ warning: state.appState.warning,
}
}
@@ -29,7 +30,7 @@ InitializeMenuScreen.prototype.render = function () {
switch (state.currentView.name) {
default:
- return this.renderMenu()
+ return this.renderMenu(state)
}
}
@@ -38,7 +39,7 @@ InitializeMenuScreen.prototype.render = function () {
// document.getElementById('password-box').focus()
// }
-InitializeMenuScreen.prototype.renderMenu = function () {
+InitializeMenuScreen.prototype.renderMenu = function (state) {
return (
h('.initialize-screen.flex-column.flex-center.flex-grow', [
@@ -49,7 +50,7 @@ InitializeMenuScreen.prototype.renderMenu = function () {
h('h1', {
style: {
- fontSize: '1.4em',
+ fontSize: '1.7em',
textTransform: 'uppercase',
color: '#7F8082',
marginBottom: 20,
@@ -90,6 +91,7 @@ InitializeMenuScreen.prototype.renderMenu = function () {
style: {
width: 260,
marginTop: 12,
+ textAlign: 'center',
},
}),
@@ -103,6 +105,7 @@ InitializeMenuScreen.prototype.renderMenu = function () {
style: {
width: 260,
marginTop: 16,
+ textAlign: 'center',
},
}),
@@ -114,6 +117,10 @@ InitializeMenuScreen.prototype.renderMenu = function () {
},
}, 'Create'),
+ (!state.inProgress && state.warning) && (
+ h('span.in-progress-notification', state.warning)
+ ),
+
/*
h('.flex-row.flex-center.flex-grow', [
h('p.pointer', {
@@ -137,6 +144,10 @@ InitializeMenuScreen.prototype.createVaultOnEnter = function (event) {
}
}
+InitializeMenuScreen.prototype.componentDidMount = function () {
+ document.getElementById('password-box').focus()
+}
+
InitializeMenuScreen.prototype.createNewVault = function () {
var passwordBox = document.getElementById('password-box')
var password = passwordBox.value
@@ -168,4 +179,3 @@ InitializeMenuScreen.prototype.inputChanged = function (event) {
y: boundingRect.top + coordinates.top - element.scrollTop,
})
}
-