Skip to content

Commit

Permalink
Normalize address upon transaction pool inspection (identity-com#35)
Browse files Browse the repository at this point in the history
* Normalize address upon tx pool inspection
* Update dependencies to fix issues reported by NPM audit
  • Loading branch information
cheelahim authored Mar 26, 2019
1 parent efe7192 commit d8baf4c
Show file tree
Hide file tree
Showing 6 changed files with 124 additions and 70 deletions.
2 changes: 0 additions & 2 deletions AUDIT.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,3 @@ Whenever you whitelist a specific advisory it is required to refer it here and j
| # | Level | Module | Title | Explanation |
|------|-------|---------|------|-------------|
| 782 | Moderate | lodash | Prototype Pollution | Dev dependency, path: smart-contracts: > truffle-artifactor > lodash |
| 755 | High | handlebars | Prototype Pollution | Dev dependency, path: nyc > istanbul-reports > handlebars |

2 changes: 1 addition & 1 deletion audit-ci.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"low": true,
"package-manager": "auto",
"report": true,
"advisories": [755, 782],
"advisories": [782],
"whitelist": []
}
133 changes: 69 additions & 64 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"mocha": "^4.1.0",
"node-fetch": "^2.3.0",
"npm-run-all": "^4.1.5",
"nyc": "^13.2.0",
"nyc": "^13.3.0",
"prettier": "1.10.2",
"proxyquire": "^2.1.0",
"sinon": "^6.0.1",
Expand Down
6 changes: 4 additions & 2 deletions src/support/nonce/accountInspector.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const ethUtil = require('ethereumjs-util');
const util = require('util');

module.exports = class AccountInspector {
Expand Down Expand Up @@ -46,9 +47,10 @@ module.exports = class AccountInspector {
}
return reject(error);
}
const checksummedAddress = ethUtil.toChecksumAddress(address);
return resolve({
pending: result.pending[address] || {},
queued: result.queued[address] || {}
pending: result.pending[checksummedAddress] || {},
queued: result.queued[checksummedAddress] || {}
});
});
});
Expand Down
Loading

0 comments on commit d8baf4c

Please sign in to comment.