CounterpartyXCP / counterparty-core

Counterparty Protocol Reference Implementation
http://counterparty.io
MIT License
286 stars 207 forks source link

API /balances result when querying for a specific asset on an address only returns those attached to UTXO's #2551

Open reinamora137 opened 5 hours ago

reinamora137 commented 5 hours ago

Steps To Reproduce

Call to: /v2/addresses/1MZUaVy6y7vmwh2MqMKTFy2JiqXteyevpN/balances

returns 2 results for MINTS token. one portion of the assets tied to a UTXO and another result with the remainder still on the account.

    {
      "address": null,
      "asset": "MINTS",
      "quantity": 6000,
      "utxo": "71342e070ab70f4b41ca7e4740e6bc7a7f3852410f78870949d38022cf421248:0",
      "utxo_address": "1MZUaVy6y7vmwh2MqMKTFy2JiqXteyevpN"
    },
    {
      "address": "1MZUaVy6y7vmwh2MqMKTFy2JiqXteyevpN",
      "asset": "MINTS",
      "quantity": 699999994000,
      "utxo": null,
      "utxo_address": null
    },

Call to /v2/addresses/1MZUaVy6y7vmwh2MqMKTFy2JiqXteyevpN/balances/MINTS

returns only 1 result

{
  "result": {
    "address": null,
    "asset": "MINTS",
    "quantity": 6000,
    "utxo": "71342e070ab70f4b41ca7e4740e6bc7a7f3852410f78870949d38022cf421248:0",
    "utxo_address": "1MZUaVy6y7vmwh2MqMKTFy2JiqXteyevpN"
  }
}
reinamora137 commented 5 hours ago

almost seems like this future optional param is enable, discussed on this issue: https://github.com/CounterpartyXCP/counterparty-core/issues/2550