Browse Source

Test there is no data loss when going from fromPsbt() => toPsbt()

psbt-support
Luke Childs 6 years ago
parent
commit
2a482bdbf4
  1. 6
      test/transaction_builder.js

6
test/transaction_builder.js

@ -190,6 +190,12 @@ describe('TransactionBuilder', () => {
assert.strictEqual(txAfter.toHex(), f.txHex) assert.strictEqual(txAfter.toHex(), f.txHex)
}) })
it('doesn\'t loose PSBT data when cycling through fromPsbt() => toPsbt(), with ' + f.description, () => {
const txb = TransactionBuilder.fromPsbt(f.psbt)
const txAfter = f.incomplete ? txb.buildIncomplete() : txb.build()
assert.strictEqual(f.psbt, txAfter.toPsbt())
})
}) })
}) })

Loading…
Cancel
Save