Update uuid to 3.x

This commit is contained in:
Alex Beregszaszi 2018-02-03 23:15:09 +00:00
parent 8801a8be0b
commit d483e5ee31
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@ var Buffer = require('safe-buffer').Buffer
var ethUtil = require('ethereumjs-util') var ethUtil = require('ethereumjs-util')
var crypto = require('crypto') var crypto = require('crypto')
var scryptsy = require('scrypt.js') var scryptsy = require('scrypt.js')
var uuid = require('uuid') var uuidv4 = require('uuid/v4')
var bs58check = require('bs58check') var bs58check = require('bs58check')
function assert (val, msg) { function assert (val, msg) {
@ -145,7 +145,7 @@ Wallet.prototype.toV3 = function (password, opts) {
return { return {
version: 3, version: 3,
id: uuid.v4({ random: opts.uuid || crypto.randomBytes(16) }), id: uuidv4({ random: opts.uuid || crypto.randomBytes(16) }),
address: this.getAddress().toString('hex'), address: this.getAddress().toString('hex'),
crypto: { crypto: {
ciphertext: ciphertext.toString('hex'), ciphertext: ciphertext.toString('hex'),

View File

@ -33,7 +33,7 @@
"safe-buffer": "^5.1.1", "safe-buffer": "^5.1.1",
"scrypt.js": "^0.2.0", "scrypt.js": "^0.2.0",
"utf8": "^3.0.0", "utf8": "^3.0.0",
"uuid": "^2.0.1" "uuid": "^3.2.1"
}, },
"devDependencies": { "devDependencies": {
"coveralls": "^3.0.0", "coveralls": "^3.0.0",