Skip to content
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.

Commit

Permalink
Merge pull request MetaMask#97 from poanetwork/develop
Browse files Browse the repository at this point in the history
NW Release 4.8.5
  • Loading branch information
vbaranov authored Aug 28, 2018
2 parents 5d51caf + 6317b22 commit dad2004
Show file tree
Hide file tree
Showing 58 changed files with 1,718 additions and 870 deletions.
54 changes: 27 additions & 27 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ workflows:
requires:
- prep-deps-npm
- prep-build
- test-e2e-firefox:
requires:
- prep-deps-npm
- prep-deps-firefox
- prep-build
# - test-e2e-firefox:
# requires:
# - prep-deps-npm
# - prep-deps-firefox
# - prep-build
- test-unit:
requires:
- prep-deps-npm
Expand All @@ -56,7 +56,7 @@ workflows:
- test-lint
- test-unit
- test-e2e-chrome
- test-e2e-firefox
# - test-e2e-firefox
- test-integration-mascara-chrome
- test-integration-mascara-firefox
- test-integration-flat-chrome
Expand Down Expand Up @@ -96,7 +96,7 @@ workflows:
jobs:
prep-deps-npm:
docker:
- image: circleci/node:8.11.3-browsers
- image: circleci/node:8.11.4-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -111,7 +111,7 @@ jobs:
- node_modules
prep-deps-firefox:
docker:
- image: circleci/node:8.11.3-browsers
- image: circleci/node:8.11.4-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -126,7 +126,7 @@ jobs:

prep-build:
docker:
- image: circleci/node:8.11.3-browsers
- image: circleci/node:8.11.4-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -145,7 +145,7 @@ jobs:

prep-docs:
docker:
- image: circleci/node:8.11.3-browsers
- image: circleci/node:8.11.4-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -160,7 +160,7 @@ jobs:

prep-scss:
docker:
- image: circleci/node:8.11.3-browsers
- image: circleci/node:8.11.4-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -179,7 +179,7 @@ jobs:

test-lint:
docker:
- image: circleci/node:8.11.3-browsers
- image: circleci/node:8.11.4-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -190,7 +190,7 @@ jobs:

test-deps:
docker:
- image: circleci/node:8.11.3-browsers
- image: circleci/node:8.11.4-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -201,7 +201,7 @@ jobs:

test-e2e-chrome:
docker:
- image: circleci/node:8.11.3-browsers
- image: circleci/node:8.11.4-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -217,7 +217,7 @@ jobs:

test-e2e-firefox:
docker:
- image: circleci/node:8.11.3-browsers
- image: circleci/node:8.11.4-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -238,7 +238,7 @@ jobs:

test-e2e-beta-chrome:
docker:
- image: circleci/node:8.11.3-browsers
- image: circleci/node:8.11.4-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -254,7 +254,7 @@ jobs:

test-e2e-beta-firefox:
docker:
- image: circleci/node:8.11.3-browsers
- image: circleci/node:8.11.4-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -275,7 +275,7 @@ jobs:

job-screens:
docker:
- image: circleci/node:8.11.3-browsers
- image: circleci/node:8.11.4-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -292,7 +292,7 @@ jobs:

job-publish-prerelease:
docker:
- image: circleci/node:8.11.3-browsers
- image: circleci/node:8.11.4-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -319,7 +319,7 @@ jobs:

job-publish-release:
docker:
- image: circleci/node:8.11.3-browsers
- image: circleci/node:8.11.4-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -332,7 +332,7 @@ jobs:

job-publish-postrelease:
docker:
- image: circleci/node:8.11.3-browsers
- image: circleci/node:8.11.4-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -355,7 +355,7 @@ jobs:

test-unit:
docker:
- image: circleci/node:8.11.3-browsers
- image: circleci/node:8.11.4-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -368,7 +368,7 @@ jobs:
environment:
browsers: '["Firefox"]'
docker:
- image: circleci/node:8.11.3-browsers
- image: circleci/node:8.11.4-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -392,7 +392,7 @@ jobs:
environment:
browsers: '["Chrome"]'
docker:
- image: circleci/node:8.11.3-browsers
- image: circleci/node:8.11.4-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -411,7 +411,7 @@ jobs:
environment:
browsers: '["Firefox"]'
docker:
- image: circleci/node:8.11.3-browsers
- image: circleci/node:8.11.4-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -435,7 +435,7 @@ jobs:
environment:
browsers: '["Chrome"]'
docker:
- image: circleci/node:8.11.3-browsers
- image: circleci/node:8.11.4-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -452,7 +452,7 @@ jobs:

all-tests-pass:
docker:
- image: circleci/node:8.11.3-browsers
- image: circleci/node:8.11.4-browsers
steps:
- run:
name: All Tests Passed
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v8.11.3
v8.11.4
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

## Current Master

## 4.8.5 Mon Aug 27 2018

- [#94](https://github.com/poanetwork/metamask-extension/pull/94): (Fix) Force open notification popup
- [#93](https://github.com/poanetwork/metamask-extension/pull/93): (Fix) Empty pending tx screen after logout/login
- [#91](https://github.com/poanetwork/metamask-extension/pull/91): (Fix) Confirm tx notification popup: network name
- [#89](https://github.com/poanetwork/metamask-extension/pull/89), [#95](https://github.com/poanetwork/metamask-extension/pull/95): (Feature) Support of token per network basis
- [#85](https://github.com/poanetwork/metamask-extension/pull/85): (Upgrade) node, npm packages versions
- [#84](https://github.com/poanetwork/metamask-extension/pull/84): (Fix) Change green color
- [#83](https://github.com/poanetwork/metamask-extension/pull/83), [#92](https://github.com/poanetwork/metamask-extension/pull/92): (Feature) Changing of password
- [#81](https://github.com/poanetwork/metamask-extension/pull/81): (Feature) Deanonymize private network
- [#80](https://github.com/poanetwork/metamask-extension/pull/80): (Feature) Remove imported account
- [#78](https://github.com/poanetwork/metamask-extension/pull/78): (Fix) Link to POA explorer for POA networks

## 4.8.4 Thu Aug 09 2018

- [#70](https://github.com/poanetwork/metamask-extension/pull/70): Change ShapeShift API key
Expand Down
25 changes: 10 additions & 15 deletions ISSUE_TEMPLATE
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
<!--

BEFORE SUBMITTING, please make sure your question hasn't been answered in our support center: https://support.metamask.io
Common questions such as "Where is my ether?" or "Where did my tokens go?" are answered there.

Bug Reports:

Briefly describe the issue you've encountered
* Expected Behavior
* Actual Behavior
* Browser Used
* Operating System Used

Screenshots are very helpful and will expedite your issue being resolved!
-->
If you are reporting a problem with Nifty Wallet, please include the following information:

### What browser and version did you use?
*Your answer*
### What operating system did you use?
*Your answer*
### Do you have screenshots showing the problem?
*Your answer*
### What is your issue?
*Your answer*
2 changes: 1 addition & 1 deletion app/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "__MSG_appName__",
"short_name": "__MSG_appName__",
"version": "4.8.4",
"version": "4.8.5",
"manifest_version": 2,
"author": "https://metamask.io",
"description": "__MSG_appDescription__",
Expand Down
8 changes: 7 additions & 1 deletion app/scripts/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,13 @@ function setupController (initState, initLangCode) {
function triggerUi () {
extension.tabs.query({ active: true }, tabs => {
const currentlyActiveMetamaskTab = Boolean(tabs.find(tab => openMetamaskTabsIDs[tab.id]))
if (!popupIsOpen && !currentlyActiveMetamaskTab && !notificationIsOpen) {
/**
* https://github.com/poanetwork/metamask-extension/issues/19
* !notificationIsOpen was removed from the check, because notification can be opened, but it can be behind the DApp
* for some reasons. For example, if notification popup was opened, but user moved focus to DApp.
* New transaction, in this case, will not appear in front of DApp.
*/
if (!popupIsOpen && !currentlyActiveMetamaskTab) {
notificationManager.showPopup()
}
})
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/controllers/detect-tokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class DetectTokensController {
ethContract.balanceOf(this.selectedAddress, (error, result) => {
if (!error) {
if (!result.isZero()) {
this._preferences.addToken(contractAddress, contracts[contractAddress].symbol, contracts[contractAddress].decimals)
this._preferences.addToken(contractAddress, contracts[contractAddress].symbol, contracts[contractAddress].decimals, this.network)
}
} else {
warn(`MetaMask - DetectTokensController balance fetch failed for ${contractAddress}.`, error)
Expand Down
6 changes: 3 additions & 3 deletions app/scripts/controllers/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,13 @@ class PreferencesController {
* @returns {Promise<array>} Promises the new array of AddedToken objects.
*
*/
async addToken (rawAddress, symbol, decimals) {
async addToken (rawAddress, symbol, decimals, network) {
const address = normalizeAddress(rawAddress)
const newEntry = { address, symbol, decimals }
const newEntry = { address, symbol, decimals, network }

const tokens = this.store.getState().tokens
const previousEntry = tokens.find((token, index) => {
return token.address === address
return (token.address === address && parseInt(token.network) === parseInt(network))
})
const previousIndex = tokens.indexOf(previousEntry)

Expand Down
5 changes: 4 additions & 1 deletion app/scripts/lib/notification-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ class NotificationManager {
// bring focus to existing chrome popup
extension.windows.update(popup.id, { focused: true })
} else {
const cb = (currentPopup) => { this._popupId = currentPopup.id }
const cb = (currentPopup) => {
this._popupId = currentPopup.id
extension.windows.update(currentPopup.id, { focused: true })
}
// create new notification popup
const creation = extension.windows.create({
url: 'notification.html',
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/lib/seed-phrase-verifier.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const KeyringController = require('eth-keyring-controller')
const KeyringController = require('eth-keychain-controller')
const log = require('loglevel')

const seedPhraseVerifier = {
Expand Down
7 changes: 6 additions & 1 deletion app/scripts/metamask-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const createOriginMiddleware = require('./lib/createOriginMiddleware')
const createLoggerMiddleware = require('./lib/createLoggerMiddleware')
const createProviderMiddleware = require('./lib/createProviderMiddleware')
const setupMultiplex = require('./lib/stream-utils.js').setupMultiplex
const KeyringController = require('eth-keyring-controller')
const KeyringController = require('eth-keychain-controller')
const NetworkController = require('./controllers/network')
const PreferencesController = require('./controllers/preferences')
const CurrencyController = require('./controllers/currency')
Expand Down Expand Up @@ -370,6 +370,7 @@ module.exports = class MetamaskController extends EventEmitter {
verifySeedPhrase: nodeify(this.verifySeedPhrase, this),
clearSeedWordCache: this.clearSeedWordCache.bind(this),
resetAccount: nodeify(this.resetAccount, this),
changePassword: nodeify(this.changePassword, this),
removeAccount: nodeify(this.removeAccount, this),
importAccountWithStrategy: nodeify(this.importAccountWithStrategy, this),

Expand Down Expand Up @@ -770,6 +771,10 @@ module.exports = class MetamaskController extends EventEmitter {
return selectedAddress
}

async changePassword (oldPassword, newPassword) {
await this.keyringController.changePassword(oldPassword, newPassword)
}

/**
* Removes an account from state / storage.
*
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/migrations/_multi-keyring.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ which we dont have access to at the time of this writing.
const ObservableStore = require('obs-store')
const ConfigManager = require('../../app/scripts/lib/config-manager')
const IdentityStoreMigrator = require('../../app/scripts/lib/idStore-migrator')
const KeyringController = require('eth-keyring-controller')
const KeyringController = require('eth-keychain-controller')

const password = 'obviously not correct'

Expand Down
Loading

0 comments on commit dad2004

Please sign in to comment.