Merge pull request #871 from MetaMask/i860-ethjsremove

Phase out ethereumjs-util from encryptor module.
feature/default_network_editable
kumavis 8 years ago committed by GitHub
commit 1a8d95f562
  1. 1
      CHANGELOG.md
  2. 10
      app/scripts/lib/encryptor.js

@ -6,6 +6,7 @@
- Fix bug that would cause MetaMask to occasionally lose its StreamProvider connection and drop requests. - Fix bug that would cause MetaMask to occasionally lose its StreamProvider connection and drop requests.
- Fix bug that would cause the Custom RPC menu item to not appear when Localhost 8545 was selected. - Fix bug that would cause the Custom RPC menu item to not appear when Localhost 8545 was selected.
- Point ropsten faucet button to actual faucet. - Point ropsten faucet button to actual faucet.
- Phase out ethereumjs-util from our encryptor module.
## 2.13.8 2016-11-16 ## 2.13.8 2016-11-16

@ -1,5 +1,3 @@
var ethUtil = require('ethereumjs-util')
module.exports = { module.exports = {
// Simple encryption methods: // Simple encryption methods:
@ -101,10 +99,10 @@ function keyFromPassword (password) {
} }
function serializeBufferFromStorage (str) { function serializeBufferFromStorage (str) {
str = ethUtil.stripHexPrefix(str) var stripStr = (str.slice(0, 2) === '0x') ? str.slice(2) : str
var buf = new Uint8Array(str.length / 2) var buf = new Uint8Array(stripStr.length / 2)
for (var i = 0; i < str.length; i += 2) { for (var i = 0; i < stripStr.length; i += 2) {
var seg = str.substr(i, 2) var seg = stripStr.substr(i, 2)
buf[i / 2] = parseInt(seg, 16) buf[i / 2] = parseInt(seg, 16)
} }
return buf return buf

Loading…
Cancel
Save