ECPair/HDNode: adds getNetwork
This commit is contained in:
parent
57d0ea84a2
commit
daafb9794e
4 changed files with 28 additions and 0 deletions
test
|
@ -167,6 +167,17 @@ describe('ECPair', function () {
|
|||
})
|
||||
})
|
||||
|
||||
describe('getNetwork', function () {
|
||||
fixtures.valid.forEach(function (f) {
|
||||
it('returns ' + f.network + ' for ' + f.WIF, function () {
|
||||
var network = NETWORKS[f.network]
|
||||
var keyPair = ECPair.fromWIF(f.WIF, NETWORKS_LIST)
|
||||
|
||||
assert.strictEqual(keyPair.getNetwork(), network)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('ecdsa wrappers', function () {
|
||||
var keyPair, hash
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue