From 4910e2f9bdf1305469edd9c55c59fb90d0e5267d Mon Sep 17 00:00:00 2001 From: Frances Pangilinan Date: Tue, 20 Dec 2016 13:49:22 -0800 Subject: [PATCH 01/13] remove network Id 2 from explorer link and Add network Id 3 --- test/unit/explorer-link-test.js | 2 +- ui/app/components/transaction-list-item.js | 3 +-- ui/lib/explorer-link.js | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/test/unit/explorer-link-test.js b/test/unit/explorer-link-test.js index 961b400fd..8aa58bff9 100644 --- a/test/unit/explorer-link-test.js +++ b/test/unit/explorer-link-test.js @@ -4,7 +4,7 @@ var linkGen = require('../../ui/lib/explorer-link') describe('explorer-link', function() { it('adds testnet prefix to morden test network', function() { - var result = linkGen('hash', '2') + var result = linkGen('hash', '3') assert.notEqual(result.indexOf('testnet'), -1, 'testnet injected') }) diff --git a/ui/app/components/transaction-list-item.js b/ui/app/components/transaction-list-item.js index 491e90c7c..f92a4ab2e 100644 --- a/ui/app/components/transaction-list-item.js +++ b/ui/app/components/transaction-list-item.js @@ -27,7 +27,7 @@ TransactionListItem.prototype.render = function () { let isLinkable = false const numericNet = parseInt(network) - isLinkable = numericNet === 1 || numericNet === 2 + isLinkable = numericNet === 1 || numericNet === 3 var isMsg = ('msgParams' in transaction) var isTx = ('txParams' in transaction) @@ -41,7 +41,6 @@ TransactionListItem.prototype.render = function () { } const isClickable = ('hash' in transaction && isLinkable) || isPending - return ( h(`.transaction-list-item.flex-row.flex-space-between${isClickable ? '.pointer' : ''}`, { onClick: (event) => { diff --git a/ui/lib/explorer-link.js b/ui/lib/explorer-link.js index 2993d1cf1..dc6be2984 100644 --- a/ui/lib/explorer-link.js +++ b/ui/lib/explorer-link.js @@ -5,7 +5,7 @@ module.exports = function (hash, network) { case 1: // main net prefix = '' break - case 2: // morden test net + case 3: // morden test net prefix = 'testnet.' break default: From 10d9cf0912d1b4c287fd7ca3b3be393ea75eae80 Mon Sep 17 00:00:00 2001 From: Frances Pangilinan Date: Tue, 20 Dec 2016 13:52:51 -0800 Subject: [PATCH 02/13] Add to CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fd1e83bf..44c841821 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Current Master +- Removed network Id 2 from the explorer links and added network Id 3 - Temporarily disable extension reload detection causing infinite reload bug. ## 2.14.0 2016-12-16 From 05e62cbc17889f1020c5ec93456b799bb4ad2b4c Mon Sep 17 00:00:00 2001 From: Frankie Date: Tue, 20 Dec 2016 14:11:00 -0800 Subject: [PATCH 03/13] make CHANGELOG more human readable --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44c841821..70ee9add3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## Current Master -- Removed network Id 2 from the explorer links and added network Id 3 +- Fixed ropsten transaction links - Temporarily disable extension reload detection causing infinite reload bug. ## 2.14.0 2016-12-16 From 29060acb722c855344b02416754ab7513be44493 Mon Sep 17 00:00:00 2001 From: Frankie Date: Tue, 10 Jan 2017 12:18:39 -0800 Subject: [PATCH 04/13] update coinbase info and view --- ui/app/components/coinbase-form.js | 8 ++++---- ui/app/reducers/app.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/app/components/coinbase-form.js b/ui/app/components/coinbase-form.js index 3c5708bf8..32e3066fd 100644 --- a/ui/app/components/coinbase-form.js +++ b/ui/app/components/coinbase-form.js @@ -72,7 +72,7 @@ CoinbaseForm.prototype.render = function () { lineHeight: '13px', }, }, - `there is a USD$ 5 a day max and a USD$ 50 + `there is a USD$ 15 a day max and a USD$ 50 dollar limit per the life time of an account without a coinbase account. A fee of 3.75% will be aplied to debit/credit cards.`), @@ -138,14 +138,14 @@ function isValidAmountforCoinBase(amount) { amount = parseFloat(amount) if (amount) { - if (amount <= 5 && amount > 0) { + if (amount <= 15 && amount > 0) { return { valid: true, } - } else if (amount > 5) { + } else if (amount > 15) { return { valid: false, - message: 'The amount can not be greater then $5', + message: 'The amount can not be greater then $15', } } else { return { diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js index 5c5c0acce..31b9e109f 100644 --- a/ui/app/reducers/app.js +++ b/ui/app/reducers/app.js @@ -418,7 +418,7 @@ function reduceApp (state, action) { }, buyView: { subview: 'buyForm', - amount: '5.00', + amount: '15.00', buyAddress: action.value, formView: { coinbase: true, From efde16aae506158d269f70b53b74b09eefd3eff8 Mon Sep 17 00:00:00 2001 From: Frankie Date: Tue, 10 Jan 2017 12:19:02 -0800 Subject: [PATCH 05/13] add to CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70ee9add3..807f03aa6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Current Master +- Update Coinbase info. and increase the buy amount to $15 - Fixed ropsten transaction links - Temporarily disable extension reload detection causing infinite reload bug. From 6481f9ced425a03f9b5260f5d5606c506c6dfef6 Mon Sep 17 00:00:00 2001 From: Frankie Date: Sat, 14 Jan 2017 22:59:05 -0800 Subject: [PATCH 06/13] Dont render conf-tx if their are no txParams to show --- ui/app/conf-tx.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/app/conf-tx.js b/ui/app/conf-tx.js index 8d8285f3d..8e255a867 100644 --- a/ui/app/conf-tx.js +++ b/ui/app/conf-tx.js @@ -43,9 +43,11 @@ ConfirmTxScreen.prototype.render = function () { var unconfMsgs = state.unconfMsgs var unconfTxList = txHelper(unconfTxs, unconfMsgs, network) var index = state.index !== undefined ? state.index : 0 - var txData = unconfTxList[index] || {txParams: {}} - var txParams = txData.txParams || {} + var txData = unconfTxList[index] || {} + var txParams = txData.txParams var isNotification = isPopupOrNotification() === 'notification' + if (!txParams) return null + return ( h('.flex-column.flex-grow', [ From 83468cbd032533542fea934e57d35f9ccec895de Mon Sep 17 00:00:00 2001 From: Frankie Date: Sat, 14 Jan 2017 23:12:53 -0800 Subject: [PATCH 07/13] add to CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 113d2f7cd..47ea81606 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Current Master +- Fix Bug where you see a empty transaction flash by on the confirm transaction view. - Create visible difference in transaction history between a approved but not yet included in a block transaction and a transaction who has been confirmed. - Fix memory leak in RPC Cache - Override RPC commands eth_syncing and web3_clientVersion From ac6a2b4b61f34d3a60fc7cab926d390e172ed276 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Mon, 16 Jan 2017 10:59:01 -0800 Subject: [PATCH 08/13] Bump changelog to mention BIP44 fix --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 826bf9bcc..2c50ce4b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Current Master +- Fix seed word account generation (https://medium.com/metamask/metamask-3-migration-guide-914b79533cdd#.t4i1qmmsz). - Fix Bug where you see a empty transaction flash by on the confirm transaction view. - Create visible difference in transaction history between a approved but not yet included in a block transaction and a transaction who has been confirmed. - Fix memory leak in RPC Cache From e7cf0f4bdd537b69d27afa3c788f67b758d02c05 Mon Sep 17 00:00:00 2001 From: kumavis Date: Mon, 16 Jan 2017 11:49:31 -0800 Subject: [PATCH 09/13] keyring - simple - fix address generation --- app/scripts/keyrings/simple.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/scripts/keyrings/simple.js b/app/scripts/keyrings/simple.js index 9717f1c45..6f4512b70 100644 --- a/app/scripts/keyrings/simple.js +++ b/app/scripts/keyrings/simple.js @@ -35,12 +35,12 @@ class SimpleKeyring extends EventEmitter { newWallets.push(Wallet.generate()) } this.wallets = this.wallets.concat(newWallets) - const hexWallets = newWallets.map(w => w.getAddress().toString('hex')) + const hexWallets = newWallets.map(w => ethUtil.bufferToHex(w.getAddress())) return Promise.resolve(hexWallets) } getAccounts () { - return Promise.resolve(this.wallets.map(w => w.getAddress().toString('hex'))) + return Promise.resolve(this.wallets.map(w => ethUtil.bufferToHex(w.getAddress()))) } // tx is an instance of the ethereumjs-transaction class. @@ -70,7 +70,7 @@ class SimpleKeyring extends EventEmitter { /* PRIVATE METHODS */ _getWalletForAccount (account) { - return this.wallets.find(w => w.getAddress().toString('hex') === account) + return this.wallets.find(w => ethUtil.bufferToHex(w.getAddress()) === account) } } From 82012cbbce47c691d322b290ad9e77723b289f0b Mon Sep 17 00:00:00 2001 From: kumavis Date: Mon, 16 Jan 2017 11:54:59 -0800 Subject: [PATCH 10/13] keyring - simple - throw error if wallet not found for address --- app/scripts/keyrings/simple.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/scripts/keyrings/simple.js b/app/scripts/keyrings/simple.js index 6f4512b70..6b16137ae 100644 --- a/app/scripts/keyrings/simple.js +++ b/app/scripts/keyrings/simple.js @@ -54,6 +54,7 @@ class SimpleKeyring extends EventEmitter { // For eth_sign, we need to sign transactions: signMessage (withAccount, data) { const wallet = this._getWalletForAccount(withAccount) + const message = ethUtil.removeHexPrefix(data) var privKey = wallet.getPrivateKey() var msgSig = ethUtil.ecsign(new Buffer(message, 'hex'), privKey) @@ -70,7 +71,9 @@ class SimpleKeyring extends EventEmitter { /* PRIVATE METHODS */ _getWalletForAccount (account) { - return this.wallets.find(w => ethUtil.bufferToHex(w.getAddress()) === account) + let wallet = this.wallets.find(w => ethUtil.bufferToHex(w.getAddress()) === account) + if (!wallet) throw new Error('Simple Keyring - Unable to find matching address.') + return wallet } } From 4a09f856d11660db3118d05f98eb410d3b208b56 Mon Sep 17 00:00:00 2001 From: kumavis Date: Mon, 16 Jan 2017 12:08:20 -0800 Subject: [PATCH 11/13] test - keyring - simple - fix fixture data --- test/unit/keyrings/simple-test.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/test/unit/keyrings/simple-test.js b/test/unit/keyrings/simple-test.js index 979abdb69..687318f99 100644 --- a/test/unit/keyrings/simple-test.js +++ b/test/unit/keyrings/simple-test.js @@ -1,5 +1,6 @@ const assert = require('assert') const extend = require('xtend') +const ethUtil = require('ethereumjs-util') const SimpleKeyring = require('../../../app/scripts/keyrings/simple') const TYPE_STR = 'Simple Key Pair' @@ -72,14 +73,10 @@ describe('simple-keyring', function() { it('calls getAddress on each wallet', function(done) { // Push a mock wallet - const desiredOutput = 'foo' + const desiredOutput = '0x18a3462427bcc9133bb46e88bcbe39cd7ef0e761' keyring.wallets.push({ getAddress() { - return { - toString() { - return desiredOutput - } - } + return ethUtil.toBuffer(desiredOutput) } }) From 9203b8c30525e37c3a8760b1d6146add099f4490 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Mon, 16 Jan 2017 14:14:06 -0800 Subject: [PATCH 12/13] Version 3.0.0 --- CHANGELOG.md | 2 ++ app/manifest.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c50ce4b8..bca599344 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Current Master +## 3.0.0 2017-1-16 + - Fix seed word account generation (https://medium.com/metamask/metamask-3-migration-guide-914b79533cdd#.t4i1qmmsz). - Fix Bug where you see a empty transaction flash by on the confirm transaction view. - Create visible difference in transaction history between a approved but not yet included in a block transaction and a transaction who has been confirmed. diff --git a/app/manifest.json b/app/manifest.json index 95dcfc31a..9eb7a8eeb 100644 --- a/app/manifest.json +++ b/app/manifest.json @@ -1,7 +1,7 @@ { "name": "MetaMask", "short_name": "Metamask", - "version": "2.14.1", + "version": "2.15.0", "manifest_version": 2, "author": "https://metamask.io", "description": "Ethereum Browser Extension", From 5de6eaf35d9800ba4b64487d602155b3cb2cc956 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Mon, 16 Jan 2017 15:02:52 -0800 Subject: [PATCH 13/13] Fix manifest version --- app/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/manifest.json b/app/manifest.json index 9eb7a8eeb..9c6558d15 100644 --- a/app/manifest.json +++ b/app/manifest.json @@ -1,7 +1,7 @@ { "name": "MetaMask", "short_name": "Metamask", - "version": "2.15.0", + "version": "3.0.0", "manifest_version": 2, "author": "https://metamask.io", "description": "Ethereum Browser Extension",