mirror of
https://github.com/Permissionless-Software-Foundation/bch-js.git
synced 2026-09-21 16:51:59 -07:00
fix(tokenUtxoDetails): Replacing tokenType with utxoType
This commit is contained in:
+2
-2
@@ -1366,11 +1366,11 @@ class Utils {
|
||||
else {
|
||||
// Minting Baton
|
||||
if (utxo.vout === slpData.mintBatonVout) {
|
||||
utxo.tokenType = "minting-baton"
|
||||
utxo.utxoType = "minting-baton"
|
||||
}
|
||||
// Tokens
|
||||
else {
|
||||
utxo.tokenType = "token"
|
||||
utxo.utxoType = "token"
|
||||
utxo.tokenQty = slpData.qty / Math.pow(10, slpData.decimals)
|
||||
}
|
||||
|
||||
|
||||
@@ -671,7 +671,7 @@ describe(`#SLP`, () => {
|
||||
assert.property(data[1], "satoshis")
|
||||
assert.property(data[1], "height")
|
||||
assert.property(data[1], "confirmations")
|
||||
assert.property(data[1], "tokenType")
|
||||
assert.property(data[1], "utxoType")
|
||||
assert.property(data[1], "tokenId")
|
||||
assert.property(data[1], "tokenTicker")
|
||||
assert.property(data[1], "tokenName")
|
||||
|
||||
@@ -1596,7 +1596,7 @@ describe("#SLP Utils", () => {
|
||||
assert2.property(data[1], "satoshis")
|
||||
assert2.property(data[1], "height")
|
||||
assert2.property(data[1], "confirmations")
|
||||
assert2.property(data[1], "tokenType")
|
||||
assert2.property(data[1], "utxoType")
|
||||
assert2.property(data[1], "tokenId")
|
||||
assert2.property(data[1], "tokenTicker")
|
||||
assert2.property(data[1], "tokenName")
|
||||
@@ -1984,9 +1984,9 @@ describe("#SLP Utils", () => {
|
||||
// console.log(`data: ${JSON.stringify(data, null, 2)}`)
|
||||
|
||||
assert2.isArray(data)
|
||||
assert2.equal(data[0].tokenType, "token")
|
||||
assert2.equal(data[0].utxoType, "token")
|
||||
assert2.equal(data[0].tokenQty, 100)
|
||||
assert2.equal(data[1].tokenType, "minting-baton")
|
||||
assert2.equal(data[1].utxoType, "minting-baton")
|
||||
assert2.equal(false, data[2])
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user