feat(SLP.Utils.hydrateUtxos): Added hydrateUtxos to match new bch-api endpoint

This commit is contained in:
Chris Troutner
2020-09-27 01:47:46 -07:00
parent b0bdc50193
commit 32b8efa7a2
4 changed files with 166 additions and 2 deletions
+15
View File
@@ -1760,4 +1760,19 @@ describe("#SLP Utils", () => {
])
})
})
describe("#hydrateUtxos", () => {
it("should throw an error if input is not an array", async () => {
try {
const utxos = 1234
await slp.Utils.hydrateUtxos(utxos)
assert2.equal(true, false, "Uh oh. Code path should not end here.")
} catch (err) {
// console.log(`Error: `, err)
assert2.include(err.message, `Input must be an array.`)
}
})
})
})