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: tokenClaimAirdrop throws NPE on null sender or receiver #17096

Merged

Conversation

kimbor
Copy link
Member

@kimbor kimbor commented Dec 17, 2024

Description:
When submitting a tokenClaimAirdrop transaction, if one of the PendingAirdropIds in the list has an empty senderId or receiverId then the transaction fails catastrophically. This PR fixes the problem and adds unit tests and hapi tests to verify the fix.

Related issue(s):
Fixes #17095
Sister PR to develop: #17097

…ansaction

Signed-off-by: Kim Rader <kim.rader@swirldslabs.com>
@kimbor kimbor requested review from a team as code owners December 17, 2024 23:57
@kimbor kimbor self-assigned this Dec 17, 2024
@kimbor kimbor added this to the v0.57 milestone Dec 17, 2024
@kimbor kimbor linked an issue Dec 18, 2024 that may be closed by this pull request
Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -1.00%) 100.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (abb296b) 98029 64272 65.56%
Head commit (658751e) 98033 (+4) 64276 (+4) 65.57% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#17096) 4 4 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Copy link
Member

@lukelee-sl lukelee-sl left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for catching this.

Copy link

codecov bot commented Dec 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.87%. Comparing base (abb296b) to head (658751e).
Report is 1 commits behind head on release/0.57.

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##             release/0.57   #17096   +/-   ##
===============================================
  Coverage           63.86%   63.87%           
- Complexity          20576    20577    +1     
===============================================
  Files                2550     2550           
  Lines               95264    95268    +4     
  Branches             9952     9952           
===============================================
+ Hits                60845    60850    +5     
  Misses              30802    30802           
+ Partials             3617     3616    -1     
Files with missing lines Coverage Δ
.../token/impl/handlers/TokenClaimAirdropHandler.java 76.85% <100.00%> (+0.79%) ⬆️

... and 1 file with indirect coverage changes

Impacted file tree graph

@kimbor kimbor modified the milestone: v0.57 Dec 18, 2024
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