stacks-blockchain-api
stacks-blockchain-api copied to clipboard
`/v1/names/{name}` does not reflect buying usernames from bids on marketplaces
Describe the bug
I am not sure if this is a bug or intended behaviour. Creating the issue to open discussion regarding the behavior of the /v1/names/{name}
endpoint.
Problem: When buying a new .btc domain via a bid from a marketplace, the /v1/names/{name}
seems to return outdated data.
The https://stacks-node-api.mainnet.stacks.co/v1/names/dayslikewater.btc endpoint, return the last_txid
field with the transaction that registered the name. In the payload, we can see that SP1TY00PDWJVNVEX7H7KJGS2K2YXHTQMY8C0G1NVP
is the current owner of this name (which is correct), but the last_txid
explorer link point to a transaction made by SPP117ENNNDQVQ1G3E0N1AP178GXBTC2YNQ3H7J
. SPP117ENNNDQVQ1G3E0N1AP178GXBTC2YNQ3H7J
is the account that bought the username at the beginning and then sold it to SP1TY00PDWJVNVEX7H7KJGS2K2YXHTQMY8C0G1NVP
.
Shouldn't this endpoint reference the bid transaction in the last_txid
result as the owner changed in this process?
Expected behavior
The https://stacks-node-api.mainnet.stacks.co/v1/names/dayslikewater.btc endpoint should return the last last_txid
when the name was transferred to the new account.
~~This looks to be related to https://github.com/hirosystems/stacks-blockchain-api/issues/1176 which is blocked by an issue on the Stacks blockchain itself~~
Related to #1287
@pradel can you share the explorer link for the transaction that transferred this name via marketplace bid?
I think what's happening is that the API is only programmed to detect name-transfer
events initiated by calling the BNS contract directly as opposed to those made through other contracts. It could be a simple fix but I'd need to see the original tx.
Thanks
@rafaelcr I think this is the transaction https://explorer.stacks.co/txid/0xa75ebee2c824c4943bf8494b101ea7ee7d44191b4a8f761582ce99ef28befb19?chain=mainnet
Thanks for the quick response @pradel
:tada: This issue has been resolved in version 5.0.0-beta.5 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version 5.0.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version 7.0.0-stacks-2.1.2 :tada:
The release is available on:
Your semantic-release bot :package::rocket: