-
Notifications
You must be signed in to change notification settings - Fork 248
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
fix_: make member use wallet tokens during permission checking #5268
fix_: make member use wallet tokens during permission checking #5268
Conversation
Jenkins BuildsClick to see older builds (71)
|
fa1c7eb
to
7b73915
Compare
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.
Great job! Just small comments.
I'll also wait for the others to review since they know this code better.
FYI, @osmaczko did a PR also on that code. Hopefully it's doesn't conflict too much.
I don't think you need to also implement the getOwnersForCollection
function from cache, since it's only for control nodes, but it's worth noting.
a402d70
to
4853508
Compare
@@ -396,6 +398,61 @@ func (o *OwnershipDB) Update(chainID w_common.ChainID, ownerAddress common.Addre | |||
return | |||
} | |||
|
|||
func (o *OwnershipDB) FetchCachedCollectibleOwnersByContractAddress(chainID w_common.ChainID, contractAddress common.Address) (*thirdparty.CollectibleContractOwnership, error) { |
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.
could you please add a test for this fn... what should we get, when info is not found?
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.
sure, please note that this is exactly the same behavior as for FetchBalancesByOwnerAndContractAddress
. Instead of looking on chain we just get the data in cache, but let me have a look if I can add a test that makes sense if not already implemented somewhere.
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.
LGTM
4853508
to
316b50c
Compare
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.
Looks good 👍
@kounkou hey, is it the change you wanted to be tested? If so, please create corresponding PR in desktop repo |
Hey @anastasiyaig please let me follow up with you once I have completed the merging of changes from @osmaczko PR. Should be achieve early next week. |
316b50c
to
7ba2a68
Compare
7ba2a68
to
a5f0f70
Compare
8151b35
to
3363e81
Compare
…checking fixes #14913
3363e81
to
b896f0a
Compare
During the testing, @glitchminer saw a problem, but it's actually not caused by this pr, it is already known issue when trying to use the same collectible multiple times when creating a permission : |
Description
During the checking of permissions that happens either on edit shared addresses or during the blurred screen when joining a community, the member will perform some permissions checking. Currently the permission checking is done by fetching tokens from the chain which is wasteful in terms of resources. These changes aims at using the cached tokens from the wallet which improves the speed of tokens retrieval and improve the user experience.
fixes #14913
Acceptance criteria
In progress
Important changes:
Closes status-im/status-desktop#14913
Manual testing
Please notince how fast the evaluation is compared to before
Before
Screencast.from.2024-06-02.01-17-01.webm
After
Screencast.from.2024-06-02.01-59-40.webm