From b430cbd064fa8564e8f8edf7c6f5517a42646504 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Wed, 11 May 2016 12:54:19 -0700 Subject: [PATCH 1/4] Fix send view selected account bug --- CHANGELOG.md | 2 ++ ui/app/send.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ce47f7ac..8062b38f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Current Master +- Fixed bug where send view would not load correctly the first time it was visited per account. + ## 1.8.1 2016-05-10 - Initial usage of scalable blockchain backend. diff --git a/ui/app/send.js b/ui/app/send.js index d34accddc..ff8ef4d65 100644 --- a/ui/app/send.js +++ b/ui/app/send.js @@ -12,7 +12,7 @@ module.exports = connect(mapStateToProps)(SendTransactionScreen) function mapStateToProps(state) { var result = { - address: state.appState.currentView.context, + address: state.metamask.selectedAccount, accounts: state.metamask.accounts, identities: state.metamask.identities, warning: state.appState.warning, From 8bfa40d2d36b11f9408e94ab82d44ac2703f760c Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Wed, 11 May 2016 13:10:54 -0700 Subject: [PATCH 2/4] Move all users to new scalable backend --- CHANGELOG.md | 1 + app/scripts/lib/migrations.js | 11 +++-------- app/scripts/migrations/004.js | 22 ++++++++++++++++++++++ test/unit/migrations-test.js | 5 +++++ 4 files changed, 31 insertions(+), 8 deletions(-) create mode 100644 app/scripts/migrations/004.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 8062b38f5..267c13da7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Current Master - Fixed bug where send view would not load correctly the first time it was visited per account. +- Migrated all users to new scalable backend. ## 1.8.1 2016-05-10 diff --git a/app/scripts/lib/migrations.js b/app/scripts/lib/migrations.js index 0b8e6265c..f026cbe53 100644 --- a/app/scripts/lib/migrations.js +++ b/app/scripts/lib/migrations.js @@ -1,10 +1,5 @@ -var path = require('path') -var fs = require('fs') - -var migration2 = require('../migrations/002') -var migration3 = require('../migrations/003') - module.exports = [ - migration2, - migration3, + require('../migrations/002'), + require('../migrations/003'), + require('../migrations/004'), ] diff --git a/app/scripts/migrations/004.js b/app/scripts/migrations/004.js new file mode 100644 index 000000000..2e3164baf --- /dev/null +++ b/app/scripts/migrations/004.js @@ -0,0 +1,22 @@ +module.exports = { + version: 4, + + migrate: function(data) { + try { + if (data.config.provider.type !== 'rpc') return data + switch (data.config.provider.rpcTarget) { + case 'https://testrpc.metamask.io/': + data.config.provider = { + type: 'testnet' + } + break + case 'https://rpc.metamask.io/': + data.config.provider = { + type: 'mainnet' + } + break + } + } catch (_) {} + return data + } +} diff --git a/test/unit/migrations-test.js b/test/unit/migrations-test.js index 3b347530a..9ea8d5c5a 100644 --- a/test/unit/migrations-test.js +++ b/test/unit/migrations-test.js @@ -5,6 +5,7 @@ var wallet1 = require(path.join('..', 'lib', 'migrations', '001.json')) var migration2 = require(path.join('..', '..', 'app', 'scripts', 'migrations', '002')) var migration3 = require(path.join('..', '..', 'app', 'scripts', 'migrations', '003')) +var migration4 = require(path.join('..', '..', 'app', 'scripts', 'migrations', '004')) describe('wallet1 is migrated successfully', function() { @@ -23,6 +24,10 @@ describe('wallet1 is migrated successfully', function() { var secondResult = migration3.migrate(firstResult) assert.equal(secondResult.config.provider.rpcTarget, newTestRpc) + var thirdResult = migration4.migrate(secondResult) + assert.equal(secondResult.config.provider.rpcTarget, null) + assert.equal(secondResult.config.provider.type, 'testnet') + done() }) }) From a468294d2c836655b8e4479ade5057667e65513e Mon Sep 17 00:00:00 2001 From: kumavis Date: Wed, 11 May 2016 13:23:53 -0700 Subject: [PATCH 3/4] deps - bump provider-engine --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7bc403494..c4210abd7 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "three.js": "^0.73.2", "through2": "^2.0.1", "web3": "^0.15.1", - "web3-provider-engine": "^7.6.2", + "web3-provider-engine": "^7.6.3", "xtend": "^4.0.1" }, "devDependencies": { From c7a491d7ace0eaa91dc495c90232cf7ace4d9a6f Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Wed, 11 May 2016 13:54:46 -0700 Subject: [PATCH 4/4] Version 1.8.2 --- CHANGELOG.md | 3 +++ app/manifest.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 267c13da7..4b863578e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,11 @@ ## Current Master +## 1.8.2 2016-05-11 + - Fixed bug where send view would not load correctly the first time it was visited per account. - Migrated all users to new scalable backend. +- Fixed `eth_syncing` method response. ## 1.8.1 2016-05-10 diff --git a/app/manifest.json b/app/manifest.json index ea4535027..9288c3503 100644 --- a/app/manifest.json +++ b/app/manifest.json @@ -1,7 +1,7 @@ { "name": "__MSG_appName__", "short_name": "Metamask", - "version": "1.8.1", + "version": "1.8.2", "manifest_version": 2, "description": "__MSG_appDescription__", "icons": {