Changes expected key output to hex

This commit is contained in:
Daniel Cousens 2014-03-24 05:09:03 +11:00
parent 2e2932c410
commit 48883dd069

View file

@ -33,7 +33,7 @@ describe('HDWallet', function() {
}) })
describe('constructor & seed deserialization', function() { describe('constructor & seed deserialization', function() {
var expectedWif = 'KwkW62Lzm4a7Eo5nPLezrVjWBGFh2KMfpyf4Swz9NmfsVaLoeXv9'; var expectedPrivateKey = '0fd71c652e847ba7ea7956e3cf3fc0a0985871846b1b2c23b9c6a29a38cee86001';
var seed = [ var seed = [
99, 114, 97, 122, 121, 32, 104, 111, 114, 115, 101, 32, 98, 99, 114, 97, 122, 121, 32, 104, 111, 114, 115, 101, 32, 98,
97, 116, 116, 101, 114, 121, 32, 115, 116, 97, 112, 108, 101 97, 116, 116, 101, 114, 121, 32, 115, 116, 97, 112, 108, 101
@ -42,7 +42,7 @@ describe('HDWallet', function() {
it('creates from binary seed', function() { it('creates from binary seed', function() {
var hd = new HDWallet(seed) var hd = new HDWallet(seed)
assert.equal(hd.priv.toWif(), expectedWif) assert.equal(hd.priv.toHex(), expectedPrivateKey)
assert(hd.pub) assert(hd.pub)
}) })
@ -50,7 +50,7 @@ describe('HDWallet', function() {
it('creates from hex seed', function() { it('creates from hex seed', function() {
var hd = HDWallet.fromSeedHex(b2h(seed)) var hd = HDWallet.fromSeedHex(b2h(seed))
assert.equal(hd.priv.toWif(), expectedWif) assert.equal(hd.priv.toHex(), expectedPrivateKey)
assert(hd.pub) assert(hd.pub)
}) })
}) })
@ -59,7 +59,7 @@ describe('HDWallet', function() {
it('creates from string seed', function() { it('creates from string seed', function() {
var hd = HDWallet.fromSeedString(convert.bytesToString(seed)) var hd = HDWallet.fromSeedString(convert.bytesToString(seed))
assert.equal(hd.priv.toWif(), expectedWif) assert.equal(hd.priv.toHex(), expectedPrivateKey)
assert(hd.pub) assert(hd.pub)
}) })
}) })