1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

Merge branch 'master' of github.com:MetaMask/metamask-extension into filter-leak-fix

This commit is contained in:
kumavis 2017-09-11 14:21:09 -07:00
commit 41164f61db
5 changed files with 29 additions and 20 deletions

View File

@ -2,9 +2,14 @@
## Current Master
- Readded loose keyring label back into the account list.
- Remove cryptonator from chrome permissions.
- Add info on token contract addresses.
- Add validation preventing users from inputting their own addresses as token tracking addresses.
## 3.9.13 2017-9-8
- Changed the way we initialize the inpage provider to fix a bug affecting some developers.
## 3.9.12 2017-9-6
- Fix bug that prevented Web3 1.0 compatibility

View File

@ -1,7 +1,7 @@
{
"name": "MetaMask",
"short_name": "Metamask",
"version": "3.9.12",
"version": "3.9.13",
"manifest_version": 2,
"author": "https://metamask.io",
"description": "Ethereum Browser Extension",
@ -57,9 +57,8 @@
"permissions": [
"storage",
"clipboardWrite",
"http://localhost:8545/",
"https://api.cryptonator.com/"
],
"http://localhost:8545/"
],
"web_accessible_resources": [
"scripts/inpage.js"
],

View File

@ -38,14 +38,22 @@ function MetamaskInpageProvider (connectionStream) {
streamMiddleware.stream,
(err) => logStreamDisconnectWarning('MetaMask RpcProvider', err)
)
// handle sendAsync requests via dapp-side rpc engine
const engine = new RpcEngine()
engine.push(createIdRemapMiddleware())
engine.push(streamMiddleware)
self.sendAsync = engine.handle.bind(engine)
// handle sendAsync requests via dapp-side rpc engine
const rpcEngine = new RpcEngine()
rpcEngine.push(createIdRemapMiddleware())
rpcEngine.push(streamMiddleware)
self.rpcEngine = rpcEngine
}
// handle sendAsync requests via asyncProvider
// also remap ids inbound and outbound
MetamaskInpageProvider.prototype.sendAsync = function (payload, cb) {
const self = this
self.rpcEngine.handle(payload, cb)
}
MetamaskInpageProvider.prototype.send = function (payload) {
const self = this
@ -91,10 +99,6 @@ MetamaskInpageProvider.prototype.send = function (payload) {
}
}
MetamaskInpageProvider.prototype.sendAsync = function () {
throw new Error('MetamaskInpageProvider - sendAsync not overwritten')
}
MetamaskInpageProvider.prototype.isConnected = function () {
return true
}

View File

@ -1,10 +1,6 @@
machine:
node:
version: 8.1.4
dependencies:
pre:
- "npm i -g testem"
- "npm i -g mocha"
test:
override:
- "npm run ci"

View File

@ -22,7 +22,7 @@ Network.prototype.render = function () {
let iconName, hoverText
if (networkNumber === 'loading') {
return h('span', {
return h('span.pointer', {
style: {
display: 'flex',
alignItems: 'center',
@ -37,7 +37,7 @@ Network.prototype.render = function () {
},
src: 'images/loading.svg',
}),
h('i.fa.fa-sort-desc'),
h('i.fa.fa-caret-down'),
])
} else if (providerName === 'mainnet') {
hoverText = 'Main Ethereum Network'
@ -73,7 +73,8 @@ Network.prototype.render = function () {
style: {
color: '#039396',
}},
'Ethereum Main Net'),
'Main Network'),
h('i.fa.fa-caret-down.fa-lg'),
])
case 'ropsten-test-network':
return h('.network-indicator', [
@ -83,6 +84,7 @@ Network.prototype.render = function () {
color: '#ff6666',
}},
'Ropsten Test Net'),
h('i.fa.fa-caret-down.fa-lg'),
])
case 'kovan-test-network':
return h('.network-indicator', [
@ -92,6 +94,7 @@ Network.prototype.render = function () {
color: '#690496',
}},
'Kovan Test Net'),
h('i.fa.fa-caret-down.fa-lg'),
])
case 'rinkeby-test-network':
return h('.network-indicator', [
@ -101,6 +104,7 @@ Network.prototype.render = function () {
color: '#e7a218',
}},
'Rinkeby Test Net'),
h('i.fa.fa-caret-down.fa-lg'),
])
default:
return h('.network-indicator', [
@ -116,6 +120,7 @@ Network.prototype.render = function () {
color: '#AEAEAE',
}},
'Private Network'),
h('i.fa.fa-caret-down.fa-lg'),
])
}
})(),