Skip to content
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: use accAddress to compare in validatebasic function in collection & token modules #1288

Merged
merged 5 commits into from
Mar 21, 2024

Conversation

170210
Copy link
Contributor

@170210 170210 commented Mar 19, 2024

Description

This PR uses accAddress instead of address to compare in the validatebasic function in the collection & token modules.
Before this PR, it used case-sensitive comparison, thus it would occur a bug when holder and operator are the same but in different capitalization.

Motivation and context

How has this been tested?

Screenshots (if appropriate):

Checklist:

  • I followed the contributing guidelines and code of conduct.
  • I have added a relevant changelog to CHANGELOG.md
  • I have added tests to cover my changes.
  • I have updated the documentation accordingly.
  • I have updated API documentation client/docs/swagger-ui/swagger.yaml

Copy link

codecov bot commented Mar 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.42%. Comparing base (5636259) to head (bda7705).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1288      +/-   ##
==========================================
+ Coverage   70.41%   70.42%   +0.01%     
==========================================
  Files         643      643              
  Lines       54693    54701       +8     
==========================================
+ Hits        38512    38525      +13     
+ Misses      14009    14006       -3     
+ Partials     2172     2170       -2     
Files Coverage Δ
x/collection/msgs.go 98.31% <100.00%> (+0.69%) ⬆️
x/token/msgs.go 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

@170210 170210 force-pushed the fix/validatebasic branch from 87b110f to ab960f2 Compare March 19, 2024 08:15
@170210 170210 force-pushed the fix/validatebasic branch from ab960f2 to f4ec723 Compare March 19, 2024 08:16
@170210 170210 requested a review from ulbqb March 19, 2024 08:16
@170210 170210 self-assigned this Mar 19, 2024
@170210 170210 marked this pull request as ready for review March 19, 2024 08:21
Copy link
Collaborator

@0Tech 0Tech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may also deal with MsgRevokeOperator.

@170210 170210 requested a review from 0Tech March 19, 2024 09:38
@170210 170210 merged commit 819a938 into Finschia:main Mar 21, 2024
38 checks passed
@170210 170210 deleted the fix/validatebasic branch March 21, 2024 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants