Merge pull request #32 from christroutner/unstable

fix(tokenUtxoDetails): Replacing tokenType with utxoType
This commit is contained in:
Chris Troutner
2020-05-31 19:50:01 -07:00
committed by GitHub
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -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)
}
+1 -1
View File
@@ -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")
+3 -3
View File
@@ -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])
})
})