-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added is_mine property to listtokens return value if token balance is… #930
Added is_mine property to listtokens return value if token balance is… #930
Conversation
0595d8c
to
8ead11a
Compare
i think what sakdeniz meant with this request was to filter the entries which are owned by the wallet (independently of the balance). you can check the logic at the minttoken or mintnft rpc commands to see how to check if a token is owned (line 1622 rpcwallet.cpp for example) |
I see, should the (mine) param for listtokens be updated as well? Cause that shows tokens that have balance, but might not be owned by the wallet. |
yes probably, those tokens can easily be filtered without the current mine just checking for balance > 0 client side |
Alright |
@aguycalled I've updated the logic, does this look good? |
i would need to test it, but initially it looks to me like it would label as mine tokens which are not owned by the wallet |
A new build of 8ead11a has completed succesfully! |
A new build of 2d7e434 has completed succesfully! |
@aguycalled this seems to be working with my testing but @sakdeniz said he was having issues, I'm still trying to investigate. @sakdeniz could you let me know what steps you took so I can replicate your issue with this. |
from what I read in the code
isMine is by default yes
this block runs only if the wallet does not have the key for the token
wallet compares the stored key with the assigned to the token. in my opinion it should be false by default and set it to true if the stored key equals the assigned to the token but giving this opinion just from reading the code |
Does this code return true even if the spend key does not own the token/nft? pwalletMain->HaveBLSCTTokenKey(it->second.key) |
If it returns true when spendkey does not own the token or nft, I think we will need to update the logic in |
@sakdeniz I think you might have been running the first build (Which was only checking balance) |
A new build of a9cafef has completed succesfully! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested gitian build on windows 10
just wondering, why not add a filter for the rpc instead? like |
Tested with latest build, and it works fine. |
A new build of fb3804b has completed succesfully! |
closes #923