Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
a3bb62a
ci - use image circle/node:12-browsers
kumavis Mar 28, 2020
893aaea
deps - remove old sesify deps
kumavis Mar 28, 2020
dfc0694
deps - readd sesify and set deps install to ignore engines field
kumavis Mar 28, 2020
4325799
fix: disable dnode weak on nodejs for node@10 support
kumavis Apr 20, 2020
018861a
deps - use fork of ethereumjs-wallet for node v12 support
kumavis Apr 20, 2020
b9a3914
ci/scripts/deps-install - remove scrypt from whitelist
kumavis Apr 20, 2020
beef044
deps - shim ethereumjs-wallet for node v12 support
kumavis Apr 20, 2020
663de1a
ci/scripts/deps-install - add workaround for scrypt
kumavis Apr 20, 2020
f0a6f30
ci/scripts/deps-install - add workaround for scrypt
kumavis Apr 20, 2020
53befa9
deps - remove old etherscan-link
kumavis Apr 21, 2020
8d645e1
update .nvmrc
rekmarks Apr 21, 2020
71f5720
deps - bump chromedriver to match ci image
kumavis Apr 23, 2020
4f8961b
test/e2e - fix test for contract creation content
kumavis Apr 23, 2020
6a74611
test/e2e - log webdriver options on start
kumavis Apr 23, 2020
157ce70
test/unit/permissions - fix promise await timing
kumavis Apr 24, 2020
ef583c0
deps - update ethUtil for ethereumjs-wallet stub
kumavis Apr 24, 2020
a72b945
Revert "deps - update ethUtil for ethereumjs-wallet stub"
kumavis Apr 24, 2020
b695530
Revert "deps - shim ethereumjs-wallet for node v12 support"
kumavis Apr 24, 2020
a7b20f0
ci/test-e2e-add-default-port-9222
kumavis Apr 24, 2020
c6ecae7
ci/chromedriver - attack wildly
kumavis Apr 24, 2020
87ebea2
ci/chromedriver - attack wildly
kumavis Apr 24, 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
Prev Previous commit
Next Next commit
fix: disable dnode weak on nodejs for node@10 support
  • Loading branch information
kumavis committed Apr 21, 2020
commit 43257999ef7838629cdbfa94f8408c829b4b1a46
1 change: 0 additions & 1 deletion .circleci/scripts/deps-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ yarn --frozen-lockfile --ignore-scripts --har --ignore-engines

# for test
(cd node_modules/scrypt && yarn run install)
(cd node_modules/weak && yarn run install)
(cd node_modules/chromedriver && yarn run install)
(cd node_modules/geckodriver && yarn run postinstall)

Expand Down
4 changes: 3 additions & 1 deletion app/scripts/metamask-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -1517,7 +1517,9 @@ export default class MetamaskController extends EventEmitter {
*/
setupControllerConnection (outStream) {
const api = this.getApi()
const dnode = Dnode(api)
// the "weak: false" option is for nodejs only (eg unit tests)
// it is a workaround for node v12 support
const dnode = Dnode(api, { weak: false })
// report new active controller connection
this.activeControllerConnections++
this.emit('controllerConnectionChanged', this.activeControllerConnections)
Expand Down
4 changes: 3 additions & 1 deletion app/scripts/phishing-detect.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ function start () {

function setupControllerConnection (connectionStream, cb) {
const eventEmitter = new EventEmitter()
// the "weak: false" option is for nodejs only (eg unit tests)
// it is a workaround for node v12 support
const metaMaskControllerDnode = dnode({
sendUpdate (state) {
eventEmitter.emit('update', state)
},
})
}, { weak: false })
connectionStream.pipe(metaMaskControllerDnode).pipe(connectionStream)
metaMaskControllerDnode.once('remote', (backgroundConnection) => cb(null, backgroundConnection))
}
4 changes: 3 additions & 1 deletion app/scripts/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,13 @@ function setupWeb3Connection (connectionStream) {
*/
function setupControllerConnection (connectionStream, cb) {
const eventEmitter = new EventEmitter()
// the "weak: false" option is for nodejs only (eg unit tests)
// it is a workaround for node v12 support
const backgroundDnode = Dnode({
sendUpdate: function (state) {
eventEmitter.emit('update', state)
},
})
}, { weak: false })
connectionStream.pipe(backgroundDnode).pipe(connectionStream)
backgroundDnode.once('remote', function (backgroundConnection) {
backgroundConnection.on = eventEmitter.on.bind(eventEmitter)
Expand Down