@psf/bch-js 6.2.7 → 6.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/utxo.js +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@psf/bch-js",
3
- "version": "6.2.7",
3
+ "version": "6.2.8",
4
4
  "description": "A JavaScript library for working with Bitcoin Cash, eCash, and SLP Tokens",
5
5
  "author": "Chris Troutner <chris.troutner@gmail.com>",
6
6
  "contributors": [
package/src/utxo.js CHANGED
@@ -157,10 +157,14 @@ class UTXO {
157
157
  // Hydrate the UTXOs with additional token data.
158
158
  type1TokenUtxos = await this.hydrateTokenData(type1TokenUtxos)
159
159
 
160
+ // Collect and hydrate any baton UTXOs
160
161
  const bchUtxos = utxos.filter(x => x.isSlp === false)
161
- const type1BatonUtxos = utxos.filter(
162
+ let type1BatonUtxos = utxos.filter(
162
163
  x => x.isSlp === true && x.type === 'baton'
163
164
  )
165
+ type1BatonUtxos = await this.hydrateTokenData(type1BatonUtxos)
166
+
167
+ // Isolate any UTXOs that are marked null by the SLP indexer.
164
168
  const nullUtxos = utxos.filter(x => x.isSlp === null)
165
169
 
166
170
  const outObj = {