Test setVersion

This commit is contained in:
Luke Childs 2019-07-04 17:00:20 +07:00
parent dc23b8cce0
commit 09a6c37430

View file

@ -178,4 +178,14 @@ describe(`Psbt`, () => {
})
})
})
describe('setVersion', () => {
it('Sets the version value of the unsigned transaction', () => {
const psbt = new Psbt()
assert.strictEqual(psbt.extractTransaction().version, 2)
psbt.setVersion(1)
assert.strictEqual(psbt.extractTransaction().version, 1)
})
})
})