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: added null check for nullable values in formatContractResult() #3210

Conversation

quiet-node
Copy link
Member

Description:
This PR adds null checks for nullable values in formatContractResult() to ensure that, if null values are passed in, they are handled correctly rather than causing a Cannot read properties of null (reading...) error.

Related issue(s):

Fixes #3209

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@quiet-node quiet-node added the bug Something isn't working label Nov 5, 2024
@quiet-node quiet-node added this to the 0.59.0 milestone Nov 5, 2024
@quiet-node quiet-node self-assigned this Nov 5, 2024
ebadiere
ebadiere previously approved these changes Nov 5, 2024
Copy link
Contributor

@ebadiere ebadiere left a comment

Choose a reason for hiding this comment

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

LG.

Copy link

github-actions bot commented Nov 5, 2024

Test Results

 17 files   -   1  229 suites   - 24   28m 55s ⏱️ -31s
603 tests ±  0  599 ✅ +  2  4 💤 ±0  0 ❌  - 2 
619 runs   - 113  615 ✅  - 111  4 💤 ±0  0 ❌  - 2 

Results for commit 9c44dfb. ± Comparison against base commit 0e31b34.

♻️ This comment has been updated with latest results.

Signed-off-by: Logan Nguyen <[email protected]>
Copy link

sonarcloud bot commented Nov 5, 2024

@ebadiere ebadiere self-requested a review November 5, 2024 03:14
@quiet-node quiet-node merged commit ca044f1 into main Nov 5, 2024
45 checks passed
@quiet-node quiet-node deleted the 3209-formatcontractresult-throws-cannot-read-properties-of-null-reading-substring branch November 5, 2024 04:06
Copy link

codecov bot commented Nov 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.11%. Comparing base (0e31b34) to head (9c44dfb).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3210      +/-   ##
==========================================
- Coverage   83.16%   83.11%   -0.05%     
==========================================
  Files          66       66              
  Lines        4312     4312              
  Branches      843      843              
==========================================
- Hits         3586     3584       -2     
- Misses        483      485       +2     
  Partials      243      243              
Flag Coverage Δ
config-service 98.14% <ø> (ø)
relay 85.23% <ø> (-0.06%) ⬇️
server 83.52% <ø> (ø)
ws-server 36.87% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 1 file with indirect coverage changes

quiet-node added a commit that referenced this pull request Nov 5, 2024
…3210)

* fix: added null check for nullable values in formatContractResult()

Signed-off-by: Logan Nguyen <[email protected]>

* fix: fixed unit tests

Signed-off-by: Logan Nguyen <[email protected]>

---------

Signed-off-by: Logan Nguyen <[email protected]>
ebadiere pushed a commit that referenced this pull request Nov 5, 2024
…3210)

* fix: added null check for nullable values in formatContractResult()

Signed-off-by: Logan Nguyen <[email protected]>

* fix: fixed unit tests

Signed-off-by: Logan Nguyen <[email protected]>

---------

Signed-off-by: Logan Nguyen <[email protected]>
quiet-node added a commit that referenced this pull request Nov 5, 2024
fix: added null check for nullable values in formatContractResult() (#3210)

* fix: added null check for nullable values in formatContractResult()



* fix: fixed unit tests



---------

Signed-off-by: Logan Nguyen <[email protected]>
quiet-node added a commit that referenced this pull request Nov 5, 2024
…ontractResult() (#3210)"

This reverts commit ca044f1.

Signed-off-by: Logan Nguyen <[email protected]>
ebadiere pushed a commit that referenced this pull request Nov 5, 2024
…ontractResult() (#3210)" (#3216)

This reverts commit ca044f1.

Signed-off-by: Logan Nguyen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

formatContractResult() throws Cannot read properties of null (reading 'substring')
3 participants