1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-23 03:36:18 +02:00

Merge branch 'master' into i#495CustomGasField

This commit is contained in:
Frankie 2016-10-10 18:18:07 -07:00
commit 3a610f2c06
14 changed files with 58 additions and 33 deletions

View File

@ -2,7 +2,18 @@
## Current Master ## Current Master
## 2.13.3 2016-10-4
- Fix bug where log queries were filtered out.
- Decreased vault confirmation button font size to help some Linux users who could not see it.
- Made popup a little taller because it would sometimes cut off buttons.
## 2.13.2 2016-10-4
- Fix bug where chosen FIAT exchange rate does no persist when switching networks - Fix bug where chosen FIAT exchange rate does no persist when switching networks
- Fix additional parameters that made MetaMask sometimes receive errors from Parity.
- Fix bug where invalid transactions would still open the MetaMask popup.
- Removed hex prefix from private key export, to increase compatibility with Geth, MyEtherWallet, and Jaxx.
## 2.13.1 2016-09-23 ## 2.13.1 2016-09-23

BIN
app/images/icon-32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
app/images/icon-64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -1,7 +1,7 @@
{ {
"name": "MetaMask", "name": "MetaMask",
"short_name": "Metamask", "short_name": "Metamask",
"version": "2.13.1", "version": "2.13.3",
"manifest_version": 2, "manifest_version": 2,
"author": "https://metamask.io", "author": "https://metamask.io",
"description": "Ethereum Browser Extension", "description": "Ethereum Browser Extension",
@ -10,7 +10,7 @@
"suggested_key": { "suggested_key": {
"windows": "Alt+Shift+M", "windows": "Alt+Shift+M",
"mac": "Alt+Shift+M", "mac": "Alt+Shift+M",
"chromeos": "Search+M", "chromeos": "Alt+Shift+M",
"linux": "Alt+Shift+M" "linux": "Alt+Shift+M"
} }
} }
@ -55,9 +55,10 @@
} }
], ],
"permissions": [ "permissions": [
"notifications",
"storage", "storage",
"tabs", "tabs",
"clipboardWrite",
"clipboardRead",
"http://localhost:8545/" "http://localhost:8545/"
], ],
"web_accessible_resources": [ "web_accessible_resources": [

View File

@ -33,7 +33,7 @@ function IdManagement (opts) {
// normalize values // normalize values
txParams.to = ethUtil.addHexPrefix(txParams.to) txParams.to = ethUtil.addHexPrefix(txParams.to)
txParams.from = ethUtil.addHexPrefix(txParams.from) txParams.from = ethUtil.addHexPrefix(txParams.from.toLowerCase())
txParams.value = ethUtil.addHexPrefix(txParams.value) txParams.value = ethUtil.addHexPrefix(txParams.value)
txParams.data = ethUtil.addHexPrefix(txParams.data) txParams.data = ethUtil.addHexPrefix(txParams.data)
txParams.gasLimit = ethUtil.addHexPrefix(txParams.gasLimit || txParams.gas) txParams.gasLimit = ethUtil.addHexPrefix(txParams.gasLimit || txParams.gas)
@ -58,7 +58,7 @@ function IdManagement (opts) {
this.signMsg = function (address, message) { this.signMsg = function (address, message) {
// sign message // sign message
var privKeyHex = this.exportPrivateKey(address) var privKeyHex = this.exportPrivateKey(address.toLowerCase())
var privKey = ethUtil.toBuffer(privKeyHex) var privKey = ethUtil.toBuffer(privKeyHex)
var msgSig = ethUtil.ecsign(new Buffer(message.replace('0x', ''), 'hex'), privKey) var msgSig = ethUtil.ecsign(new Buffer(message.replace('0x', ''), 'hex'), privKey)
var rawMsgSig = ethUtil.bufferToHex(concatSig(msgSig.v, msgSig.r, msgSig.s)) var rawMsgSig = ethUtil.bufferToHex(concatSig(msgSig.v, msgSig.r, msgSig.s))

View File

@ -80,8 +80,8 @@ MetamaskInpageProvider.prototype.send = function (payload) {
// throw not-supported Error // throw not-supported Error
default: default:
var message = 'The MetaMask Web3 object does not support synchronous methods like ' + payload.method + var link = 'https://github.com/MetaMask/faq/blob/master/DEVELOPERS.md#dizzy-all-async---think-of-metamask-as-a-light-client'
'. See https://github.com/MetaMask/faq/blob/master/DEVELOPERS.md#all-async---think-of-metamask-as-a-light-client for details.' var message = `The MetaMask Web3 object does not support synchronous methods like ${payload.method}. See ${link} for details.`
throw new Error(message) throw new Error(message)
} }

View File

@ -1,5 +1,5 @@
const extension = require('./extension') const extension = require('./extension')
const height = 500 const height = 520
const width = 360 const width = 360
const notifications = { const notifications = {

View File

@ -203,26 +203,15 @@ module.exports = class MetamaskController {
newUnsignedTransaction (txParams, onTxDoneCb) { newUnsignedTransaction (txParams, onTxDoneCb) {
const idStore = this.idStore const idStore = this.idStore
var state = idStore.getState()
let err = this.enforceTxValidations(txParams) let err = this.enforceTxValidations(txParams)
if (err) return onTxDoneCb(err) if (err) return onTxDoneCb(err)
// It's locked idStore.addUnconfirmedTransaction(txParams, onTxDoneCb, (err, txData) => {
if (!state.isUnlocked) { if (err) return onTxDoneCb(err)
this.sendUpdate()
// Allow the environment to define an unlock message. this.opts.showUnconfirmedTx(txParams, txData, onTxDoneCb)
this.opts.unlockAccountMessage() })
idStore.addUnconfirmedTransaction(txParams, onTxDoneCb, noop)
// It's unlocked
} else {
idStore.addUnconfirmedTransaction(txParams, onTxDoneCb, (err, txData) => {
if (err) return onTxDoneCb(err)
this.sendUpdate()
this.opts.showUnconfirmedTx(txParams, txData, onTxDoneCb)
})
}
} }
enforceTxValidations (txParams) { enforceTxValidations (txParams) {
@ -353,4 +342,3 @@ module.exports = class MetamaskController {
} }
} }
function noop () {}

12
development/announcer.js Normal file
View File

@ -0,0 +1,12 @@
var manifest = require('../app/manifest.json')
var version = manifest.version
var fs = require('fs')
var path = require('path')
var changelog = fs.readFileSync(path.join(__dirname, '..', 'CHANGELOG.md')).toString()
var log = changelog.split(version)[1].split('##')[0].trim()
let msg = `*MetaMask ${version}* now published to the Chrome Store! It should auto-update over the next hour!\n${log}`
console.log(msg)

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,8 @@
MetaMask is an extension for accessing Ethereum enabled distributed applications, or "Dapps" in your normal browser!
The extension injects the Ethereum web3 API into every website's javascript context, so that dapps can read from the blockchain.
MetaMask also lets the user create and manage their own identities, so when a Dapp wants to perform a transaction and write to the blockchain, the user gets a secure interface to review the transaction, before approving or rejecting it.
Because it adds functionality to the normal browser context, MetaMask requires the permission to read and write to any webpage. You can always "view the source" of MetaMask the way you do any extension, or view the source code on Github:
https://github.com/MetaMask/metamask-plugin

View File

@ -15,7 +15,8 @@
"mock": "beefy mock-dev.js:bundle.js --live --open --index=./development/index.html --cwd ./", "mock": "beefy mock-dev.js:bundle.js --live --open --index=./development/index.html --cwd ./",
"buildMock": "browserify ./mock-dev.js -o ./development/bundle.js", "buildMock": "browserify ./mock-dev.js -o ./development/bundle.js",
"testem": "npm run buildMock && testem", "testem": "npm run buildMock && testem",
"ci": "npm run buildMock && testem ci -P 2" "ci": "npm run buildMock && testem ci -P 2",
"announce": "node development/announcer.js"
}, },
"browserify": { "browserify": {
"transform": [ "transform": [
@ -81,7 +82,7 @@
"through2": "^2.0.1", "through2": "^2.0.1",
"vreme": "^3.0.2", "vreme": "^3.0.2",
"web3": "ethereum/web3.js#260ac6e78a8ce4b2e13f5bb0fdb65f4088585876", "web3": "ethereum/web3.js#260ac6e78a8ce4b2e13f5bb0fdb65f4088585876",
"web3-provider-engine": "^8.0.7", "web3-provider-engine": "^8.1.5",
"web3-stream-provider": "^2.0.6", "web3-stream-provider": "^2.0.6",
"xtend": "^4.0.1" "xtend": "^4.0.1"
}, },

View File

@ -3,6 +3,7 @@ const h = require('react-hyperscript')
const inherits = require('util').inherits const inherits = require('util').inherits
const copyToClipboard = require('copy-to-clipboard') const copyToClipboard = require('copy-to-clipboard')
const actions = require('../actions') const actions = require('../actions')
const ethUtil = require('ethereumjs-util')
module.exports = ExportAccountView module.exports = ExportAccountView
@ -61,7 +62,9 @@ ExportAccountView.prototype.render = function () {
if (accountExported) { if (accountExported) {
return h('div.privateKey', { return h('div.privateKey', {
style: {
margin: '0 20px',
},
}, [ }, [
h('label', 'Your private key (click to copy):'), h('label', 'Your private key (click to copy):'),
h('p.error.cursor-pointer', { h('p.error.cursor-pointer', {
@ -72,9 +75,9 @@ ExportAccountView.prototype.render = function () {
width: '100%', width: '100%',
}, },
onClick: function (event) { onClick: function (event) {
copyToClipboard(accountDetail.privateKey) copyToClipboard(ethUtil.stripHexPrefix(accountDetail.privateKey))
}, },
}, accountDetail.privateKey), }, ethUtil.stripHexPrefix(accountDetail.privateKey)),
h('button', { h('button', {
onClick: () => this.props.dispatch(actions.backToAccountDetail(this.props.address)), onClick: () => this.props.dispatch(actions.backToAccountDetail(this.props.address)),
}, 'Done'), }, 'Done'),

View File

@ -61,6 +61,7 @@ CreateVaultCompleteScreen.prototype.render = function () {
onClick: () => this.confirmSeedWords(), onClick: () => this.confirmSeedWords(),
style: { style: {
margin: '24px', margin: '24px',
fontSize: '0.9em',
}, },
}, 'I\'ve copied it somewhere safe'), }, 'I\'ve copied it somewhere safe'),
]) ])