Closed thr0wn closed 4 years ago
Thanks for the PR! It looks like a great addition to the repository, and mirrors a similar PR I just created for tokenUtxoDetails()
a couple days ago.
And thanks for alerting us to the issue. We just caught it ourselves.
The only thing we need to do before accepting the PR is for the Developer Services team to review the implications to SLP-aware wallets interacting with isTokenUtxo()
if we merge this PR.
We recently got clarity: SLPDB returns null
for a BCH-only TXID AND it returns null
for SLP transactions that it hasn't processed yet.
That's the main thing we need to take into consideration.
Going to merge this PR. Thank you @thr0wn!
After this PR is merged, I'll also refactor this function to match the refactoring done to tokenUtxoDetails()
in PR #86. The new behavior of this function will return confident false
or true
. It will only return null
if SLPDB has not processed the UTXO yet and has not yet made a determination of its validity.
Created Issue #87 to capture future work.
Hi :)
I found that
SLP.Utils.isTokenUtxo
does not handle validations likeSLP.Utils.tokenUtxoDetails
. More specifically, the following code ofSLP.Utils.isTokenUtxo
does not handle null cases of x:I think that it should be done like in https://github.com/Bitcoin-com/slp-sdk/blob/master/src/Util.ts#L462, correct?
By the way, thanks for your effort here at slp-sdk, it is a really helpful library!