Skip to content

Commit 59e92ad

Browse files
committed
fix(mintNFTGroupOpReturn()): Updating to use UTXOs from psf-slp-indexer
1 parent f369411 commit 59e92ad

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/slp/nft1.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ class Nft1 {
147147
// Loop through the tokenUtxos array and find the minting baton.
148148
let mintBatonUtxo
149149
for (let i = 0; i < tokenUtxos.length; i++) {
150-
if (tokenUtxos[i].utxoType === 'minting-baton') {
150+
if (tokenUtxos[i].utxoType === 'minting-baton' || tokenUtxos[i].type === 'baton') {
151151
mintBatonUtxo = tokenUtxos[i]
152152
}
153153
}

test/integration/chains/bchn/utxo-integration.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,15 @@ describe('#UTXO', () => {
113113
assert.isAbove(result.slpUtxos.group.mintBatons.length, 0)
114114
})
115115

116-
// it('should filter NFTs', async () => {
117-
// const addr = 'bitcoincash:qq7vp2kvejsql898a2760kuq6xz00h0a5vs4h72ysz'
118-
//
119-
// const result = await bchjs.Utxo.get(addr)
120-
// console.log(`result: ${JSON.stringify(result, null, 2)}`)
121-
//
122-
// // assert.isAbove(result.slpUtxos.group.tokens.length, 0)
123-
// // assert.isAbove(result.slpUtxos.group.mintBatons.length, 0)
124-
// })
116+
it('should filter NFTs', async () => {
117+
const addr = 'simpleledger:qq7vp2kvejsql898a2760kuq6xz00h0a5vuwu9lywu'
118+
119+
const result = await bchjs.Utxo.get(addr)
120+
console.log(`result: ${JSON.stringify(result, null, 2)}`)
121+
122+
// assert.isAbove(result.slpUtxos.group.tokens.length, 0)
123+
// assert.isAbove(result.slpUtxos.group.mintBatons.length, 0)
124+
})
125125
})
126126
})
127127

0 commit comments

Comments
 (0)