Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NW pre-release 5.0.0 #341

Merged
merged 54 commits into from
Mar 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
2456ef5
Node version upgrade up to 12.15.0
vbaranov Feb 21, 2020
bdf27a3
Merge pull request #316 from poanetwork/vb-node-upgrade
vbaranov Feb 21, 2020
6c3d143
Fix path to derive accounts in HD wallets for RSK, ETC
vbaranov Feb 21, 2020
3e70aff
Fix pasting ABI for contract type account
vbaranov Feb 23, 2020
8d86a60
Merge pull request #318 from poanetwork/vb-fix-pasting-abi
vbaranov Feb 23, 2020
69281c0
Check stateMutability prop to define if this is reading method
vbaranov Feb 27, 2020
7e40ea9
Merge pull request #319 from poanetwork/vb-check-state-mutability
vbaranov Feb 27, 2020
6811656
Merge remote-tracking branch 'origin/develop' into vb-fix-path-for-hd…
vbaranov Feb 27, 2020
3a964cb
Fix customHdPaths import
vbaranov Feb 28, 2020
872952e
Fix
vbaranov Feb 29, 2020
986c4c4
Update explorer links
vbaranov Mar 9, 2020
045851d
Add CHANGELOG entry
vbaranov Mar 9, 2020
5d4ac43
Update Mainnet tokens metadata
vbaranov Mar 9, 2020
86c4eb1
Merge pull request #322 from poanetwork/vb-update-explorer-links
vbaranov Mar 9, 2020
fd8a2e1
Merge branch 'develop' into vb-update-mainnet-contracts-metadata
vbaranov Mar 9, 2020
3ac14bd
Whitelist Geon token
vbaranov Mar 9, 2020
26beff2
Merge pull request #323 from poanetwork/vb-update-mainnet-contracts-m…
vbaranov Mar 10, 2020
4ed56b4
Merge branch 'develop' into vb-whitelist-geon-token
vbaranov Mar 10, 2020
5a640d1
Merge pull request #324 from poanetwork/vb-whitelist-geon-token
vbaranov Mar 10, 2020
37ae097
Merge branch 'develop' into vb-fix-path-for-hd-walet
vbaranov Mar 10, 2020
e30217c
Merge branch 'vb-fix-path-for-hd-walet' of github.com:poanetwork/nift…
vbaranov Mar 10, 2020
a672bf9
Fix HW connection
vbaranov Mar 10, 2020
1416ffa
Updated Chrome bundle
vbaranov Mar 10, 2020
c067f50
Remove temporary bundle
vbaranov Mar 10, 2020
cd43b92
Merge pull request #317 from poanetwork/vb-fix-path-for-hd-walet
vbaranov Mar 10, 2020
aa5283e
HTTP2 RPC endpoints for POA and xDai
vbaranov Mar 10, 2020
f62fb8c
Merge pull request #326 from poanetwork/vb-https2-rpc
vbaranov Mar 10, 2020
7904ec6
Update vulnerable npm deps
vbaranov Mar 11, 2020
a0477bf
Merge pull request #327 from poanetwork/vb-npm-audit
vbaranov Mar 11, 2020
6568bf1
Connect to unknown network fix
vbaranov Mar 11, 2020
10d6399
Merge pull request #329 from poanetwork/vb-connect-to-unknown-network
vbaranov Mar 11, 2020
3bc3b26
Derive correct addresses for custom networks
vbaranov Mar 11, 2020
c1cf97f
Add temp bundle
vbaranov Mar 12, 2020
0238896
Return some tests
vbaranov Mar 18, 2020
aadaa79
Fix token rate
vbaranov Mar 18, 2020
371787a
Merge pull request #330 from poanetwork/vb-dpath-fix
vbaranov Mar 18, 2020
2007e2a
Return to mainn screenn from removal of account
vbaranov Mar 20, 2020
71fb4e1
Update npm dependencies
vbaranov Mar 20, 2020
fd1e6c9
Merge pull request #332 from poanetwork/vb-fix-remove-acc
vbaranov Mar 21, 2020
2299e25
Support RSK testnet explorer links
vbaranov Mar 23, 2020
91918a6
Merge pull request #333 from poanetwork/vb-rsk-testnet-explorer-links…
vbaranov Mar 23, 2020
576e957
Ability to set tx value for payable methods
vbaranov Mar 24, 2020
736d3e7
Merge pull request #334 from poanetwork/vb-value-transfer-in-proxy
vbaranov Mar 24, 2020
a7af4a0
Update deps
vbaranov Mar 25, 2020
77388d3
Merge pull request #336 from poanetwork/update-deps
vbaranov Mar 25, 2020
e24a9d2
Refactoring
vbaranov Mar 25, 2020
9ed5e6d
Merge pull request #337 from poanetwork/vb-eip-1193-final
vbaranov Mar 27, 2020
e48397c
Refactoring 2 before EIP - 1193
vbaranov Mar 27, 2020
f9a9162
Merge pull request #338 from poanetwork/vb-eip-1193-final
vbaranov Mar 27, 2020
8441117
Refactoring 3 before EIP - 1193
vbaranov Mar 27, 2020
2d6753d
Merge pull request #339 from poanetwork/refactor
vbaranov Mar 27, 2020
e23e14f
Update inpage provider
vbaranov Mar 30, 2020
46d54ae
Merge pull request #340 from poanetwork/update-inpage-provider
vbaranov Mar 30, 2020
4f50d9c
NW 5.0.0
vbaranov Mar 30, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .babelrc

This file was deleted.

48 changes: 21 additions & 27 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,23 +92,23 @@ workflows:
jobs:
prep-deps-npm:
docker:
- image: circleci/node:12.13.1-browsers
- image: circleci/node:10.19.0-browsers
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ .Revision }}
- run:
name: Install npm 6 + deps via npm
command: |
sudo npm install -g npm@6.12.1 && npm install --no-save
sudo npm install -g npm@6.13.4 && npm install --no-save
- save_cache:
key: dependency-cache-{{ .Revision }}
paths:
- node_modules

prep-build:
docker:
- image: circleci/node:12.13.1-browsers
- image: circleci/node:10.19.0-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -127,7 +127,7 @@ jobs:

prep-docs:
docker:
- image: circleci/node:12.13.1-browsers
- image: circleci/node:10.19.0-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -142,7 +142,7 @@ jobs:

prep-scss:
docker:
- image: circleci/node:12.13.1-browsers
- image: circleci/node:10.19.0-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -161,7 +161,7 @@ jobs:

test-lint:
docker:
- image: circleci/node:12.13.1-browsers
- image: circleci/node:10.19.0-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -172,7 +172,7 @@ jobs:

# test-deps:
# docker:
# - image: circleci/node:12.13.1-browsers
# - image: circleci/node:10.19.0-browsers
# steps:
# - checkout
# - restore_cache:
Expand All @@ -183,7 +183,7 @@ jobs:

test-e2e-chrome:
docker:
- image: circleci/node:12.13.1-browsers
- image: circleci/node:10.19.0-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -208,7 +208,7 @@ jobs:

test-e2e-firefox:
docker:
- image: circleci/node:12.13.1-browsers
- image: circleci/node:10.19.0-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -229,7 +229,7 @@ jobs:

test-e2e-beta-chrome:
docker:
- image: circleci/node:12.13.1-browsers
- image: circleci/node:10.19.0-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -245,7 +245,7 @@ jobs:

test-e2e-beta-firefox:
docker:
- image: circleci/node:12.13.1-browsers
- image: circleci/node:10.19.0-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -266,7 +266,7 @@ jobs:

job-screens:
docker:
- image: circleci/node:12.13.1-browsers
- image: circleci/node:10.19.0-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -283,7 +283,7 @@ jobs:

job-publish-prerelease:
docker:
- image: circleci/node:12.13.1-browsers
- image: circleci/node:10.19.0-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -310,7 +310,7 @@ jobs:

job-publish-release:
docker:
- image: circleci/node:12.13.1-browsers
- image: circleci/node:10.19.0-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -323,7 +323,7 @@ jobs:

job-publish-postrelease:
docker:
- image: circleci/node:12.13.1-browsers
- image: circleci/node:10.19.0-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -337,16 +337,10 @@ jobs:
- run:
name: sentry sourcemaps upload
command: npm run sentry:publish
# - run:
# name: github gh-pages docs publish
# command: >
# git config user.name metamaskbot
# git config user.email admin@metamask.io
# gh-pages -d docs/jsdocs

test-unit:
docker:
- image: circleci/node:12.13.1-browsers
- image: circleci/node:10.19.0-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -359,7 +353,7 @@ jobs:
environment:
browsers: '["Firefox"]'
docker:
- image: circleci/node:12.13.1-browsers
- image: circleci/node:10.19.0-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -377,7 +371,7 @@ jobs:
environment:
browsers: '["Chrome"]'
docker:
- image: circleci/node:12.13.1-browsers
- image: circleci/node:10.19.0-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -390,7 +384,7 @@ jobs:
environment:
browsers: '["Firefox"]'
docker:
- image: circleci/node:12.13.1-browsers
- image: circleci/node:10.19.0-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -408,7 +402,7 @@ jobs:
environment:
browsers: '["Chrome"]'
docker:
- image: circleci/node:12.13.1-browsers
- image: circleci/node:10.19.0-browsers
steps:
- checkout
- restore_cache:
Expand All @@ -419,7 +413,7 @@ jobs:

all-tests-pass:
docker:
- image: circleci/node:12.13.1-browsers
- image: circleci/node:10.19.0-browsers
steps:
- run:
name: All Tests Passed
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
},

"plugins": [
"babel",
"mocha",
"chai",
"react",
"json"
],
Expand Down
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@

## Current Master

## 5.0.0 Tue Mar 31 2020

- [#340](https://github.com/poanetwork/nifty-wallet/pull/340) - (Feature) Update in-page provider (EIP-1193)
- [#334](https://github.com/poanetwork/nifty-wallet/pull/334) - (Feature) Ability to set tx value for payable methods
- [#333](https://github.com/poanetwork/nifty-wallet/pull/333) - (Fix) Support RSK testnet explorer links
- [#332](https://github.com/poanetwork/nifty-wallet/pull/332) - (Chore) Return to main screen from removal of imported account
- [#330](https://github.com/poanetwork/nifty-wallet/pull/330) - (Fix) Derive correct addresses for custom networks (RSK/ETC)
- [#329](https://github.com/poanetwork/nifty-wallet/pull/329) - (Fix) Connect to unknown private network fix
- [#326](https://github.com/poanetwork/nifty-wallet/pull/326) - (Chore) HTTP2 RPC endpoints for POA and xDai
- [#324](https://github.com/poanetwork/nifty-wallet/pull/324) - (Chore) Whitelist Geon token
- [#323](https://github.com/poanetwork/nifty-wallet/pull/323) - (Chore) update Mainnet tokens metadata
- [#322](https://github.com/poanetwork/nifty-wallet/pull/322) - (Fix) Update explorers links
- [#318](https://github.com/poanetwork/nifty-wallet/pull/318) - (Fix) pasting of ABI for contract type account
- [#317](https://github.com/poanetwork/nifty-wallet/pull/317) - (Fix) path to derive accounts in HD wallets for RSK, ETC

## 4.11.10 Tue Feb 04 2020

- [#313](https://github.com/poanetwork/nifty-wallet/pull/313) - Change Ethereum classic RPC endpoint
Expand Down
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

## Building locally

- Install [Node.js](https://nodejs.org/en/) version 10.16.0 and npm version 6.9.0
- Install [Node.js](https://nodejs.org/en/) version 10.x.x and npm version 6.13.4
- If you are using [nvm](https://github.com/creationix/nvm#installation) (recommended) running `nvm use` will automatically choose the right node version for you.
- Select npm 6.9.0: ```npm install -g npm@6.9.0```
- Install dependencies: ```npm install```
Expand All @@ -18,10 +18,6 @@

Uncompressed builds can be found in `/dist`, compressed builds can be found in `/builds` once they're built.

## Contributing

You can re-generate the docs locally by running `npm run doc`, and contributors can update the hosted docs by running `npm run publish-docs`.

### Running Tests

Requires `mocha` installed. Run `npm install -g mocha`.
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.11.10",
"version": "5.0.0",
"manifest_version": 2,
"author": "POA Network",
"description": "__MSG_appDescription__",
Expand Down
36 changes: 16 additions & 20 deletions app/scripts/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// this needs to run before anything else
require('./lib/setupFetchDebugging')()

const urlUtil = require('url')
const endOfStream = require('end-of-stream')
const pump = require('pump')
const debounce = require('debounce-stream')
Expand All @@ -29,7 +28,6 @@ const setupMetamaskMeshMetrics = require('./lib/setupMetamaskMeshMetrics')
const EdgeEncryptor = require('./edge-encryptor')
const getFirstPreferredLangCode = require('./lib/get-first-preferred-lang-code')
const getObjStructure = require('./lib/getObjStructure')
const ipfsContent = require('./lib/ipfsContent.js')

const {
ENVIRONMENT_TYPE_POPUP,
Expand Down Expand Up @@ -59,7 +57,6 @@ const isIE = !!document.documentMode
// Edge 20+
const isEdge = !isIE && !!window.StyleMedia

let ipfsHandle
let popupIsOpen = false
let notificationIsOpen = false
const openMetamaskTabsIDs = {}
Expand Down Expand Up @@ -126,6 +123,7 @@ setupMetamaskMeshMetrics()
* @property {string} provider.rpcTarget - The address for the RPC API, if using an RPC API.
* @property {string} provider.type - An identifier for the type of network selected, allows MetaMask to use custom provider strategies for known networks.
* @property {string} network - A stringified number of the current network ID.
* @property {string} dPath - A path to derive accounts.
* @property {Object} accounts - An object mapping lower-case hex addresses to objects with "balance" and "address" keys, both storing hex string values.
* @property {hex} currentBlockGasLimit - The most recently seen block gas limit, in a lower case hex prefixed string.
* @property {TransactionMeta[]} selectedAddressTxList - An array of transactions associated with the currently selected account.
Expand Down Expand Up @@ -165,7 +163,6 @@ async function initialize () {
const initLangCode = await getFirstPreferredLangCode()
await setupController(initState, initLangCode)
log.debug('Nifty Wallet initialization complete.')
ipfsHandle = ipfsContent(initState.NetworkController.provider)
}

//
Expand Down Expand Up @@ -270,11 +267,6 @@ function setupController (initState, initLangCode) {
})
global.metamaskController = controller

controller.networkController.on('networkDidChange', () => {
ipfsHandle && ipfsHandle.remove()
ipfsHandle = ipfsContent(controller.networkController.providerStore.getState())
})

// report failed transactions to Sentry
controller.txController.on(`tx:status-update`, (txId, status) => {
if (status !== 'failed') return
Expand All @@ -294,7 +286,7 @@ function setupController (initState, initLangCode) {
createStreamSink(persistData),
(error) => {
log.error('Nifty Wallet - Persistence pipeline failed', error)
}
},
)

/**
Expand Down Expand Up @@ -396,9 +388,8 @@ function setupController (initState, initLangCode) {

// communication with page or other extension
function connectExternal (remotePort) {
const originDomain = urlUtil.parse(remotePort.sender.url).hostname
const portStream = new PortStream(remotePort)
controller.setupUntrustedCommunication(portStream, originDomain)
controller.setupUntrustedCommunication(portStream, remotePort.sender)
}

//
Expand All @@ -409,19 +400,24 @@ function setupController (initState, initLangCode) {
controller.txController.on('update:badge', updateBadge)
controller.messageManager.on('updateBadge', updateBadge)
controller.personalMessageManager.on('updateBadge', updateBadge)
controller.decryptMessageManager.on('updateBadge', updateBadge)
controller.encryptionPublicKeyManager.on('updateBadge', updateBadge)
controller.typedMessageManager.on('updateBadge', updateBadge)

/**
* Updates the Web Extension's "badge" number, on the little fox in the toolbar.
* The number reflects the current number of pending transactions or message signatures needing user approval.
*/
function updateBadge () {
var label = ''
var unapprovedTxCount = controller.txController.getUnapprovedTxCount()
var unapprovedMsgCount = controller.messageManager.unapprovedMsgCount
var unapprovedPersonalMsgs = controller.personalMessageManager.unapprovedPersonalMsgCount
var unapprovedTypedMsgs = controller.typedMessageManager.unapprovedTypedMessagesCount
var count = unapprovedTxCount + unapprovedMsgCount + unapprovedPersonalMsgs + unapprovedTypedMsgs
let label = ''
const unapprovedTxCount = controller.txController.getUnapprovedTxCount()
const unapprovedMsgCount = controller.messageManager.unapprovedMsgCount
const unapprovedPersonalMsgCount = controller.personalMessageManager.unapprovedPersonalMsgCount
const unapprovedDecryptMsgCount = controller.decryptMessageManager.unapprovedDecryptMsgCount
const unapprovedEncryptionPublicKeyMsgCount = controller.encryptionPublicKeyManager.unapprovedEncryptionPublicKeyMsgCount
const unapprovedTypedMessagesCount = controller.typedMessageManager.unapprovedTypedMessagesCount
const count = unapprovedTxCount + unapprovedMsgCount + unapprovedPersonalMsgCount + unapprovedDecryptMsgCount + unapprovedEncryptionPublicKeyMsgCount +
unapprovedTypedMessagesCount
if (count) {
label = String(count)
}
Expand Down Expand Up @@ -462,12 +458,12 @@ function showWatchAssetUi () {
triggerUi()
return new Promise(
(resolve) => {
var interval = setInterval(() => {
const interval = setInterval(() => {
if (!notificationIsOpen) {
clearInterval(interval)
resolve()
}
}, 1000)
}
},
)
}
Loading