mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge branch 'master' into i#519buyButtonTxConf
This commit is contained in:
commit
8ea086290b
10
CHANGELOG.md
10
CHANGELOG.md
@ -2,10 +2,18 @@
|
|||||||
|
|
||||||
## Current Master
|
## Current Master
|
||||||
|
|
||||||
|
## 2.12.1 2016-09-14
|
||||||
|
|
||||||
|
- Fixed bug where if you send a transaction from within MetaMask extension the
|
||||||
|
popup notification opens up.
|
||||||
|
- Fixed bug where some tx errors would block subsequent txs until the plugin was refreshed.
|
||||||
|
|
||||||
|
## 2.12.0 2016-09-14
|
||||||
|
|
||||||
|
- Add a QR button to the Account detail screen
|
||||||
- Fixed bug where opening MetaMask could close a non-metamask popup.
|
- Fixed bug where opening MetaMask could close a non-metamask popup.
|
||||||
- Fixed memory leak that caused occasional crashes.
|
- Fixed memory leak that caused occasional crashes.
|
||||||
|
|
||||||
- Add a QR button to the Account detail screen
|
|
||||||
## 2.11.1 2016-09-12
|
## 2.11.1 2016-09-12
|
||||||
|
|
||||||
- Fix bug that prevented caches from being cleared in Opera.
|
- Fix bug that prevented caches from being cleared in Opera.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "MetaMask",
|
"name": "MetaMask",
|
||||||
"short_name": "Metamask",
|
"short_name": "Metamask",
|
||||||
"version": "2.11.1",
|
"version": "2.12.1",
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"author": "https://metamask.io",
|
"author": "https://metamask.io",
|
||||||
"description": "Ethereum Browser Extension",
|
"description": "Ethereum Browser Extension",
|
||||||
|
@ -10,31 +10,22 @@ const MetamaskController = require('./metamask-controller')
|
|||||||
const extension = require('./lib/extension')
|
const extension = require('./lib/extension')
|
||||||
|
|
||||||
const STORAGE_KEY = 'metamask-config'
|
const STORAGE_KEY = 'metamask-config'
|
||||||
|
var popupIsOpen = false
|
||||||
|
|
||||||
const controller = new MetamaskController({
|
const controller = new MetamaskController({
|
||||||
// User confirmation callbacks:
|
// User confirmation callbacks:
|
||||||
showUnconfirmedMessage,
|
showUnconfirmedMessage: triggerUi,
|
||||||
unlockAccountMessage,
|
unlockAccountMessage: triggerUi,
|
||||||
showUnconfirmedTx,
|
showUnconfirmedTx: triggerUi,
|
||||||
// Persistence Methods:
|
// Persistence Methods:
|
||||||
setData,
|
setData,
|
||||||
loadData,
|
loadData,
|
||||||
})
|
})
|
||||||
const idStore = controller.idStore
|
const idStore = controller.idStore
|
||||||
|
|
||||||
function unlockAccountMessage () {
|
function triggerUi () {
|
||||||
notification.show()
|
if (!popupIsOpen) notification.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
function showUnconfirmedMessage (msgParams, msgId) {
|
|
||||||
notification.show()
|
|
||||||
}
|
|
||||||
|
|
||||||
function showUnconfirmedTx (txParams, txData, onTxDoneCb) {
|
|
||||||
notification.show()
|
|
||||||
}
|
|
||||||
|
|
||||||
// On first install, open a window to MetaMask website to how-it-works.
|
// On first install, open a window to MetaMask website to how-it-works.
|
||||||
|
|
||||||
extension.runtime.onInstalled.addListener(function (details) {
|
extension.runtime.onInstalled.addListener(function (details) {
|
||||||
@ -53,7 +44,8 @@ function connectRemote (remotePort) {
|
|||||||
var portStream = new PortStream(remotePort)
|
var portStream = new PortStream(remotePort)
|
||||||
if (isMetaMaskInternalProcess) {
|
if (isMetaMaskInternalProcess) {
|
||||||
// communication with popup
|
// communication with popup
|
||||||
setupTrustedCommunication(portStream, 'MetaMask')
|
popupIsOpen = remotePort.name === 'popup'
|
||||||
|
setupTrustedCommunication(portStream, 'MetaMask', remotePort.name)
|
||||||
} else {
|
} else {
|
||||||
// communication with page
|
// communication with page
|
||||||
var originDomain = urlUtil.parse(remotePort.sender.url).hostname
|
var originDomain = urlUtil.parse(remotePort.sender.url).hostname
|
||||||
@ -95,6 +87,7 @@ function setupControllerConnection (stream) {
|
|||||||
// teardown on disconnect
|
// teardown on disconnect
|
||||||
eos(stream, () => {
|
eos(stream, () => {
|
||||||
controller.ethStore.removeListener('update', controller.sendUpdate.bind(controller))
|
controller.ethStore.removeListener('update', controller.sendUpdate.bind(controller))
|
||||||
|
popupIsOpen = false
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
var assert = require('assert')
|
var assert = require('assert')
|
||||||
var sinon = require('sinon')
|
var sinon = require('sinon')
|
||||||
const ethUtil = require('ethereumjs-util')
|
const ethUtil = require('ethereumjs-util')
|
||||||
GLOBAL.chrome = {}
|
global.chrome = {}
|
||||||
GLOBAL.browser = {}
|
global.browser = {}
|
||||||
|
|
||||||
var path = require('path')
|
var path = require('path')
|
||||||
var Extension = require(path.join(__dirname, '..', '..', 'app', 'scripts', 'lib', 'extension-instance.js'))
|
var Extension = require(path.join(__dirname, '..', '..', 'app', 'scripts', 'lib', 'extension-instance.js'))
|
||||||
@ -13,7 +13,7 @@ describe('extension', function() {
|
|||||||
const desiredResult = 'http://the-desired-result.io'
|
const desiredResult = 'http://the-desired-result.io'
|
||||||
|
|
||||||
describe('in Chrome or Firefox', function() {
|
describe('in Chrome or Firefox', function() {
|
||||||
GLOBAL.chrome.extension = {
|
global.chrome.extension = {
|
||||||
getURL: () => desiredResult
|
getURL: () => desiredResult
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ describe('extension', function() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
describe('in Microsoft Edge', function() {
|
describe('in Microsoft Edge', function() {
|
||||||
GLOBAL.browser.extension = {
|
global.browser.extension = {
|
||||||
getURL: () => desiredResult
|
getURL: () => desiredResult
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ describe('extension', function() {
|
|||||||
let extension
|
let extension
|
||||||
|
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
GLOBAL.chrome = {
|
global.chrome = {
|
||||||
alarms: 'foo'
|
alarms: 'foo'
|
||||||
}
|
}
|
||||||
extension = new Extension()
|
extension = new Extension()
|
||||||
@ -58,9 +58,9 @@ describe('extension', function() {
|
|||||||
|
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
realWindow = window
|
realWindow = window
|
||||||
window = GLOBAL
|
window = global
|
||||||
GLOBAL.chrome = undefined
|
global.chrome = undefined
|
||||||
GLOBAL.alarms = 'foo'
|
global.alarms = 'foo'
|
||||||
extension = new Extension()
|
extension = new Extension()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -160,7 +160,9 @@ ConfirmTxScreen.prototype.goHome = function (event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function warningIfExists (warning) {
|
function warningIfExists (warning) {
|
||||||
if (warning) {
|
if (warning &&
|
||||||
|
// Do not display user rejections on this screen:
|
||||||
|
warning.indexOf('User denied transaction signature') === -1) {
|
||||||
return h('span.error', { style: { margin: 'auto' } }, warning)
|
return h('span.error', { style: { margin: 'auto' } }, warning)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user