remove usage of instanced Scripts
This commit is contained in:
parent
5d2abb523e
commit
e743c58ed6
11 changed files with 146 additions and 119 deletions
test
|
@ -31,7 +31,7 @@ describe('Address', function () {
|
|||
describe('fromOutputScript', function () {
|
||||
fixtures.valid.forEach(function (f) {
|
||||
it('parses ' + f.script.slice(0, 30) + '... (' + f.network + ')', function () {
|
||||
var script = Script.fromASM(f.script)
|
||||
var script = Script.fromASM(f.script).buffer
|
||||
var address = Address.fromOutputScript(script, networks[f.network])
|
||||
|
||||
assert.strictEqual(address, f.base58check)
|
||||
|
@ -40,7 +40,7 @@ describe('Address', function () {
|
|||
|
||||
fixtures.invalid.fromOutputScript.forEach(function (f) {
|
||||
it('throws when ' + f.script.slice(0, 30) + '... ' + f.exception, function () {
|
||||
var script = Script.fromASM(f.script)
|
||||
var script = Script.fromASM(f.script).buffer
|
||||
|
||||
assert.throws(function () {
|
||||
Address.fromOutputScript(script)
|
||||
|
@ -66,7 +66,7 @@ describe('Address', function () {
|
|||
it('exports ' + f.script.slice(0, 30) + '... (' + f.network + ')', function () {
|
||||
var script = Address.toOutputScript(f.base58check, network)
|
||||
|
||||
assert.strictEqual(script.toASM(), f.script)
|
||||
assert.strictEqual(Script.fromBuffer(script).toASM(), f.script)
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue