fix(Utxo.get()): Hydrating mint batons for tokens

This commit is contained in:
Chris Troutner
2022-04-24 09:15:10 -07:00
parent 62056e1ac4
commit f7ba6bb3ae
+5 -1
View File
@@ -157,10 +157,14 @@ class UTXO {
// Hydrate the UTXOs with additional token data.
type1TokenUtxos = await this.hydrateTokenData(type1TokenUtxos)
// Collect and hydrate any baton UTXOs
const bchUtxos = utxos.filter(x => x.isSlp === false)
const type1BatonUtxos = utxos.filter(
let type1BatonUtxos = utxos.filter(
x => x.isSlp === true && x.type === 'baton'
)
type1BatonUtxos = await this.hydrateTokenData(type1BatonUtxos)
// Isolate any UTXOs that are marked null by the SLP indexer.
const nullUtxos = utxos.filter(x => x.isSlp === null)
const outObj = {