Bitcoin-com / rest.bitcoin.com

Bitcoin.com's Cloud's REST API
https://rest.bitcoin.com
MIT License
19 stars 26 forks source link

GET /v2/slp/txDetails/{id} stopped including OP_RETURN as output in send amounts #573

Open m4ktub opened 4 years ago

m4ktub commented 4 years ago

Previously (for example, when #532 was reported) the txDetails would count the OP_RETURN output as any other output which meant it would set its value to 0 in tokenInfo.sendOutputs. For example

{
  "tokenInfo": { 
    "versionType":1,
    "transactionType":"SEND",
    "tokenIdHex":"49be89bbbe018bcfaebcb41cac8340bc555f022b47b922599e510b143603f4b6",
    "sendOutputs": [ "0", "1" ]
  }
}

But the API changed in a breaking way and now OP_RETURN is not excluded. For the same example shown before it not returns:

{
  "tokenInfo": { 
    "versionType":1,
    "transactionType":"SEND",
    "tokenIdHex":"49be89bbbe018bcfaebcb41cac8340bc555f022b47b922599e510b143603f4b6",
    "sendOutputs": [ "1" ]
  }
}

This means that the index of the value and the index of the vout no longer match.