Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:MetaMask/metamask-extension into…
Browse files Browse the repository at this point in the history
… ValidateEmptyKey
  • Loading branch information
kumavis committed Jun 14, 2018
2 parents 691ac5d + 66c77dc commit e9cb650
Show file tree
Hide file tree
Showing 204 changed files with 8,267 additions and 1,737 deletions.
75 changes: 53 additions & 22 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ workflows:
- prep-deps-npm
- prep-deps-firefox
- prep-build
- test-e2e-beta-chrome:
requires:
- prep-deps-npm
- prep-build
- test-e2e-beta-firefox:
requires:
- prep-deps-npm
- prep-deps-firefox
- prep-build
- test-unit:
requires:
- prep-deps-npm
Expand Down Expand Up @@ -57,6 +66,8 @@ workflows:
- test-unit
- test-e2e-chrome
- test-e2e-firefox
- test-e2e-beta-chrome
- test-e2e-beta-firefox
- test-integration-mascara-chrome
- test-integration-mascara-firefox
- test-integration-flat-chrome
Expand Down Expand Up @@ -110,9 +121,7 @@ jobs:
- checkout
- run:
name: Download Firefox
command: >
wget https://ftp.mozilla.org/pub/firefox/releases/58.0/linux-x86_64/en-US/firefox-58.0.tar.bz2
&& tar xjf firefox-58.0.tar.bz2
command: ./.circleci/scripts/firefox-download.sh
- save_cache:
key: dependency-cache-firefox-{{ .Revision }}
paths:
Expand Down Expand Up @@ -203,15 +212,13 @@ jobs:
- restore_cache:
key: build-cache-{{ .Revision }}
- run:
name: Test
name: test:e2e:chrome
command: npm run test:e2e:chrome
- store_artifacts:
path: test-artifacts
destination: test-artifacts

test-e2e-firefox:
environment:
browsers: '["Firefox"]'
docker:
- image: circleci/node:8-browsers
steps:
Expand All @@ -220,11 +227,7 @@ jobs:
key: dependency-cache-firefox-{{ .Revision }}
- run:
name: Install firefox
command: >
sudo rm -r /opt/firefox
&& sudo mv firefox /opt/firefox58
&& sudo mv /usr/bin/firefox /usr/bin/firefox-old
&& sudo ln -s /opt/firefox58/firefox /usr/bin/firefox
command: ./.circleci/scripts/firefox-install.sh
- restore_cache:
key: dependency-cache-{{ .Revision }}
- restore_cache:
Expand All @@ -236,6 +239,43 @@ jobs:
path: test-artifacts
destination: test-artifacts

test-e2e-beta-chrome:
docker:
- image: circleci/node:8-browsers
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ .Revision }}
- restore_cache:
key: build-cache-{{ .Revision }}
- run:
name: test:e2e:chrome:beta
command: npm run test:e2e:chrome:beta
- store_artifacts:
path: test-artifacts
destination: test-artifacts

test-e2e-beta-firefox:
docker:
- image: circleci/node:8-browsers
steps:
- checkout
- restore_cache:
key: dependency-cache-firefox-{{ .Revision }}
- run:
name: Install firefox
command: ./.circleci/scripts/firefox-install.sh
- restore_cache:
key: dependency-cache-{{ .Revision }}
- restore_cache:
key: build-cache-{{ .Revision }}
- run:
name: test:e2e:firefox:beta
command: npm run test:e2e:firefox:beta
- store_artifacts:
path: test-artifacts
destination: test-artifacts

job-screens:
docker:
- image: circleci/node:8-browsers
Expand Down Expand Up @@ -325,11 +365,7 @@ jobs:
key: dependency-cache-firefox-{{ .Revision }}
- run:
name: Install firefox
command: >
sudo rm -r /opt/firefox
&& sudo mv firefox /opt/firefox58
&& sudo mv /usr/bin/firefox /usr/bin/firefox-old
&& sudo ln -s /opt/firefox58/firefox /usr/bin/firefox
command: ./.circleci/scripts/firefox-install.sh
- restore_cache:
key: dependency-cache-{{ .Revision }}
- run:
Expand Down Expand Up @@ -372,11 +408,7 @@ jobs:
key: dependency-cache-firefox-{{ .Revision }}
- run:
name: Install firefox
command: >
sudo rm -r /opt/firefox
&& sudo mv firefox /opt/firefox58
&& sudo mv /usr/bin/firefox /usr/bin/firefox-old
&& sudo ln -s /opt/firefox58/firefox /usr/bin/firefox
command: ./.circleci/scripts/firefox-install.sh
- restore_cache:
key: dependency-cache-{{ .Revision }}
- run:
Expand Down Expand Up @@ -415,4 +447,3 @@ jobs:
- run:
name: All Tests Passed
command: echo 'weew - everything passed!'

6 changes: 6 additions & 0 deletions .circleci/scripts/firefox-download.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

echo "Downloading firefox..."
wget https://ftp.mozilla.org/pub/firefox/releases/58.0/linux-x86_64/en-US/firefox-58.0.tar.bz2 \
&& tar xjf firefox-58.0.tar.bz2
echo "firefox download complete"
8 changes: 8 additions & 0 deletions .circleci/scripts/firefox-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

echo "Installing firefox..."
sudo rm -r /opt/firefox
sudo mv firefox /opt/firefox58
sudo mv /usr/bin/firefox /usr/bin/firefox-old
sudo ln -s /opt/firefox58/firefox /usr/bin/firefox
echo "Firefox installed."
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
"operator-linebreak": [1, "after", { "overrides": { "?": "ignore", ":": "ignore" } }],
"padded-blocks": "off",
"quotes": [2, "single", {"avoidEscape": true, "allowTemplateLiterals": true}],
"react/no-deprecated": 0,
"semi": [2, "never"],
"semi-spacing": [2, { "before": false, "after": true }],
"space-before-blocks": [1, "always"],
Expand Down
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,22 @@
## Current Master

- Attempting to import an empty private key will now show a clear error.
- Fixes issue where old nicknames were kept around causing errors.
- Fix bug where metamask data would stop being written to disk after prolonged use
- Fix bug where account reset did not work with custom RPC providers.
- Fix bug where nonce mutex was never released
- Stop reloading browser page on Ethereum network change

## 4.7.4 Tue Jun 05 2018

- Add diagnostic reporting for users with multiple HD keyrings
- Throw explicit error when selected account is unset

## 4.7.3 Mon Jun 04 2018

- Hide token now uses new modal
- Indicate the current selected account on the popup account view
- Reduce height of notice container in onboarding
- Fixes issue where old nicknames were kept around causing errors

## 4.7.2 Sun Jun 03 2018

Expand Down
7 changes: 7 additions & 0 deletions app/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,9 @@
"editAccountName": {
"message": "Edit Account Name"
},
"editingTransaction": {
"message": "Make changes to your transaction"
},
"emailUs": {
"message": "Email us!"
},
Expand Down Expand Up @@ -771,6 +774,10 @@
"onlySendToEtherAddress": {
"message": "Only send ETH to an Ethereum address."
},
"onlySendTokensToAccountAddress": {
"message": "Only send $1 to an Ethereum account address.",
"description": "displays token symbol"
},
"searchTokens": {
"message": "Search Tokens"
},
Expand Down
43 changes: 41 additions & 2 deletions app/_locales/ja/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@
"message": " $1以上 $2以下にして下さい。",
"description": "helper for inputting hex as decimal input"
},
"blockiesIdenticon": {
"message": "Blockies Identicon を使用"
},
"borrowDharma": {
"message": "Dharmaで借りる(ベータ版)"
},
Expand Down Expand Up @@ -95,6 +98,9 @@
"confirmTransaction": {
"message": "トランザクションの確認"
},
"continue": {
"message": "続行"
},
"continueToCoinbase": {
"message": "Coinbaseを開く"
},
Expand Down Expand Up @@ -359,6 +365,9 @@
"likeToAddTokens": {
"message": "トークンを追加しますか?"
},
"links": {
"message": "リンク"
},
"limit": {
"message": "リミット"
},
Expand All @@ -371,12 +380,18 @@
"localhost": {
"message": "Localhost 8545"
},
"login": {
"message": "ログイン"
},
"logout": {
"message": "ログアウト"
},
"loose": {
"message": "外部秘密鍵"
},
"max": {
"message": "最大"
},
"mainnet": {
"message": "Ethereumメインネットワーク"
},
Expand Down Expand Up @@ -417,7 +432,7 @@
"message": "新規コントラクト"
},
"newPassword": {
"message": "新規パスワード(最低8文字)"
"message": "新規パスワード(最低8文字)"
},
"newRecipient": {
"message": "新規受取人"
Expand Down Expand Up @@ -453,6 +468,9 @@
"message": "または",
"description": "choice between creating or importing a new account"
},
"password": {
"message": "パスワード"
},
"passwordMismatch": {
"message": "パスワードが一致しません。",
"description": "in password creation process, the two new password fields did not match"
Expand All @@ -474,6 +492,9 @@
"popularTokens": {
"message": "人気のトークン"
},
"privacyMsg": {
"message": "プライバシーポリシー"
},
"privateKey": {
"message": "秘密鍵",
"description": "select this type of file to use to import an account"
Expand Down Expand Up @@ -546,6 +567,12 @@
"message": "ファイルとして保存",
"description": "Account export process"
},
"search": {
"message": "検索"
},
"searchResults": {
"message": "検索結果"
},
"selectService": {
"message": "サービスを選択"
},
Expand Down Expand Up @@ -575,7 +602,7 @@
},
"info": {
"message": "情報"
},
},
"shapeshiftBuy": {
"message": "Shapeshiftで交換"
},
Expand Down Expand Up @@ -609,6 +636,9 @@
"takesTooLong": {
"message": "送信に時間がかかりますか?"
},
"terms": {
"message": "利用規約"
},
"testFaucet": {
"message": "Faucetをテスト"
},
Expand All @@ -619,6 +649,9 @@
"message": "ShapeShiftで $1をETHにする",
"description": "system will fill in deposit type in start of message"
},
"token": {
"message": "トークン"
},
"tokenAddress": {
"message": "トークンアドレス"
},
Expand Down Expand Up @@ -690,6 +723,12 @@
"warning": {
"message": "警告"
},
"welcomeBack": {
"message": "おかえりなさい!"
},
"welcomeBeta": {
"message": "MetaMask ベータ版へようこそ!"
},
"whatsThis": {
"message": "この機能について"
},
Expand Down
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.7.2",
"version": "4.7.4",
"manifest_version": 2,
"author": "https://metamask.io",
"description": "__MSG_appDescription__",
Expand Down
14 changes: 8 additions & 6 deletions app/scripts/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const ExtensionPlatform = require('./platforms/extension')
const Migrator = require('./lib/migrator/')
const migrations = require('./migrations/')
const PortStream = require('./lib/port-stream.js')
const createStreamSink = require('./lib/createStreamSink')
const NotificationManager = require('./lib/notification-manager.js')
const MetamaskController = require('./metamask-controller')
const firstTimeState = require('./first-time-state')
Expand Down Expand Up @@ -273,7 +274,7 @@ function setupController (initState, initLangCode) {
asStream(controller.store),
debounce(1000),
storeTransform(versionifyData),
storeTransform(persistData),
createStreamSink(persistData),
(error) => {
log.error('MetaMask - Persistence pipeline failed', error)
}
Expand All @@ -289,20 +290,21 @@ function setupController (initState, initLangCode) {
return versionedData
}

function persistData (state) {
async function persistData (state) {
if (!state) {
throw new Error('MetaMask - updated state is missing', state)
}
if (!state.data) {
throw new Error('MetaMask - updated state does not have data', state)
}
if (localStore.isSupported) {
localStore.set(state)
.catch((err) => {
try {
await localStore.set(state)
} catch (err) {
// log error so we dont break the pipeline
log.error('error setting state in local store:', err)
})
}
}
return state
}

//
Expand Down
Loading

0 comments on commit e9cb650

Please sign in to comment.