Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Commit

Permalink
Fix deps (#342)
Browse files Browse the repository at this point in the history
* revert ethereumjs-tx/util updates

* ci - run against node v12 as well
  • Loading branch information
kumavis committed May 28, 2020
1 parent eccdf18 commit f911f68
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 12 deletions.
16 changes: 14 additions & 2 deletions .circleci/config.yml
Expand Up @@ -4,10 +4,22 @@ workflows:
version: 2
test:
jobs:
- test
- test-node-8
- test-node-12

jobs:
test:
test-node-8:
docker:
- image: circleci/node:8-browsers
steps:
- checkout
- run:
name: Install deps via yarn
command: yarn install
- run:
name: Run tests
command: yarn test
test-node-12:
docker:
- image: circleci/node:8-browsers
steps:
Expand Down
6 changes: 3 additions & 3 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "web3-provider-engine",
"version": "15.0.10",
"version": "15.0.8",
"description": "A JavaScript library for composing Ethereum provider objects using middleware modules",
"repository": "https://github.com/MetaMask/web3-provider-engine",
"main": "index.js",
Expand All @@ -27,8 +27,8 @@
"eth-json-rpc-middleware": "^4.1.5",
"eth-sig-util": "^1.4.2",
"ethereumjs-block": "^1.2.2",
"ethereumjs-tx": "^2.1.2",
"ethereumjs-util": "^6.0.0",
"ethereumjs-tx": "^1.2.0",
"ethereumjs-util": "^5.1.5",
"ethereumjs-vm": "^2.3.4",
"json-stable-stringify": "^1.0.1",
"promise-to-callback": "^1.0.0",
Expand Down
6 changes: 3 additions & 3 deletions subproviders/hooked-wallet-ethtx.js
Expand Up @@ -10,7 +10,7 @@

const inherits = require('util').inherits
const HookedWalletProvider = require('./hooked-wallet.js')
const { Transaction } = require('ethereumjs-tx')
const EthTx = require('ethereumjs-tx')
const ethUtil = require('ethereumjs-util')
const sigUtil = require('eth-sig-util')

Expand All @@ -32,7 +32,7 @@ function HookedWalletEthTxSubprovider(opts) {
opts.getPrivateKey(txData.from, function(err, privateKey) {
if (err) return cb(err)

var tx = new Transaction(txData)
var tx = new EthTx(txData)
tx.sign(privateKey)
cb(null, '0x' + tx.serialize().toString('hex'))
})
Expand All @@ -41,7 +41,7 @@ function HookedWalletEthTxSubprovider(opts) {
self.signMessage = function(msgParams, cb) {
opts.getPrivateKey(msgParams.from, function(err, privateKey) {
if (err) return cb(err)
var dataBuff = Buffer.from(msgParams.data, 'utf8')
var dataBuff = ethUtil.toBuffer(msgParams.data)
var msgHash = ethUtil.hashPersonalMessage(dataBuff)
var sig = ethUtil.ecsign(msgHash, privateKey)
var serialized = ethUtil.bufferToHex(concatSig(sig.v, sig.r, sig.s))
Expand Down
2 changes: 1 addition & 1 deletion subproviders/nonce-tracker.js
@@ -1,5 +1,5 @@
const inherits = require('util').inherits
const { Transaction } = require('ethereumjs-tx')
const Transaction = require('ethereumjs-tx')
const ethUtil = require('ethereumjs-util')
const Subprovider = require('./subprovider.js')
const blockTagForPayload = require('../util/rpc-cache-utils').blockTagForPayload
Expand Down
2 changes: 1 addition & 1 deletion subproviders/vm.js
Expand Up @@ -3,7 +3,7 @@ const inherits = require('util').inherits
const Stoplight = require('../util/stoplight.js')
const createVm = require('ethereumjs-vm/dist/hooked').fromWeb3Provider
const Block = require('ethereumjs-block')
const { FakeTransaction } = require('ethereumjs-tx')
const FakeTransaction = require('ethereumjs-tx/fake.js')
const ethUtil = require('ethereumjs-util')
const createPayload = require('../util/create-payload.js')
const rpcHexEncoding = require('../util/rpc-hex-encoding.js')
Expand Down
2 changes: 1 addition & 1 deletion test/nonce.js
@@ -1,5 +1,5 @@
const test = require('tape')
const { Transaction } = require('ethereumjs-tx')
const Transaction = require('ethereumjs-tx')
const ethUtil = require('ethereumjs-util')
const ProviderEngine = require('../index.js')
const FixtureProvider = require('../subproviders/fixture.js')
Expand Down
2 changes: 1 addition & 1 deletion test/wallet.js
@@ -1,5 +1,5 @@
const test = require('tape')
const { Transaction } = require('ethereumjs-tx')
const Transaction = require('ethereumjs-tx')
const ethUtil = require('ethereumjs-util')
const ProviderEngine = require('../index.js')
const FixtureProvider = require('../subproviders/fixture.js')
Expand Down

0 comments on commit f911f68

Please sign in to comment.