fix(mobile): guard against null certificate entries causing crash#4473
Merged
stackchain merged 4 commits intodevelopfrom Mar 3, 2026
Merged
fix(mobile): guard against null certificate entries causing crash#4473stackchain merged 4 commits intodevelopfrom
stackchain merged 4 commits intodevelopfrom
Conversation
…rray After failed storage migrations, certificate arrays can contain null entries from corrupted/partial transaction cache data. This causes "cannot read property 'kind' of null" crashes when viewing transactions.
Move the null filter from certificateKinds mapping to the certificates array initialization so that all downstream length checks also exclude null entries, preventing misclassification of corrupted certificate transactions.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
mobile/src/features/ReviewTx/common/hooks/useFormattedTxFromWalletTransaction.tsx
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #4473 +/- ##
========================================
Coverage 21.97% 21.98%
========================================
Files 1412 1412
Lines 36183 36189 +6
Branches 8169 8170 +1
========================================
+ Hits 7953 7955 +2
- Misses 27626 27630 +4
Partials 604 604 🚀 New features to boost your workflow:
|
stackchain
approved these changes
Mar 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cannot read property 'kind' of nullcrash when viewing transaction historytransactionSummary.ts,operationDisplay.ts,getOperationTypeKey.ts,useFormattedTxFromWalletTransaction.tsx)transactionManager.tsto prevent the issue at the sourceTest plan
🤖 Generated with Claude Code
Note
Low Risk
Defensive filtering/guards around corrupted cached transaction data; behavior change is limited to ignoring
nullcertificate entries and bumping app/package versions.Overview
Prevents crashes when rendering transaction history/details by filtering out
nullentries in transactioncertificatesboth at persistence boundaries (parseTxintransactionManager.ts) and at key UI/logic consumers (formatted tx hook, operation display/type key, and MIR reward summary).Also bumps the mobile app/package version from
7.0.3to7.0.4(including lockfiles) for the release.Written by Cursor Bugbot for commit 1fe41c3. This will update automatically on new commits. Configure here.