Renames variables to better reflect their values
This commit is contained in:
parent
e9fdfecfea
commit
2e2932c410
1 changed files with 8 additions and 12 deletions
|
@ -33,20 +33,16 @@ describe('HDWallet', function() {
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('constructor & seed deserialization', function() {
|
describe('constructor & seed deserialization', function() {
|
||||||
var expectedPrivKey, seed;
|
var expectedWif = 'KwkW62Lzm4a7Eo5nPLezrVjWBGFh2KMfpyf4Swz9NmfsVaLoeXv9';
|
||||||
|
var seed = [
|
||||||
beforeEach(function(){
|
99, 114, 97, 122, 121, 32, 104, 111, 114, 115, 101, 32, 98,
|
||||||
expectedPrivKey = 'KwkW62Lzm4a7Eo5nPLezrVjWBGFh2KMfpyf4Swz9NmfsVaLoeXv9'
|
97, 116, 116, 101, 114, 121, 32, 115, 116, 97, 112, 108, 101
|
||||||
seed = [
|
];
|
||||||
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
|
|
||||||
]
|
|
||||||
})
|
|
||||||
|
|
||||||
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(), expectedPrivKey)
|
assert.equal(hd.priv.toWif(), expectedWif)
|
||||||
assert(hd.pub)
|
assert(hd.pub)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -54,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(), expectedPrivKey)
|
assert.equal(hd.priv.toWif(), expectedWif)
|
||||||
assert(hd.pub)
|
assert(hd.pub)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -63,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(), expectedPrivKey)
|
assert.equal(hd.priv.toWif(), expectedWif)
|
||||||
assert(hd.pub)
|
assert(hd.pub)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Reference in a new issue