Conversation
The Counter component was concatenating counter, unitsText, and closingText without spaces, resulting in text like "3565Tokensfound" instead of "3565 Tokens found".
The deep link watcher was re-processing the same initial URL when the processLink callback reference changed during navigation. This caused a loop where users were sent back to the start of the Send flow repeatedly. Added URL-based tracking using a Set ref to prevent re-processing the same URL. Also simplified ActionHandler and ClaimActionHandler to use the same consistent Set-based pattern instead of fragile object reference comparisons.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #4469 +/- ##
========================================
Coverage 21.97% 21.97%
========================================
Files 1412 1412
Lines 36193 36183 -10
Branches 8177 8169 -8
========================================
Hits 7953 7953
+ Misses 27636 27626 -10
Partials 604 604 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| }) | ||
| if (isWebCardanoLink(url)) { | ||
| try { | ||
| processedUrlsRef.current.add(url) |
There was a problem hiding this comment.
URL marked processed before parsing can fail
Medium Severity
In checkInitialUrlAfterLogin, the URL is added to processedUrlsRef before parseCardanoLink(url) is called. Since parseCardanoLink can throw errors (e.g., SchemeNotImplemented, ParamsValidationFailed, UnknownContent), if parsing fails the URL remains marked as processed and the user cannot retry. This contrasts with Yoroi link handling where the URL is only marked processed after successful parsing.
| const url = await Linking.getInitialURL() | ||
| if (url !== null) { | ||
| if (url !== null && !processedUrlsRef.current.has(url)) { | ||
| processedUrlsRef.current.add(url) |
There was a problem hiding this comment.
Initial URL marked processed before processing can fail
Medium Severity
In the "app is closed - check initial URL on mount" effect, the URL is added to processedUrlsRef on line 78 before processLink(url) is called on line 79. The processLink function can fail silently when parsing Cardano links (errors are caught and logged internally). If processing fails, the URL remains in the processed set and cannot be retried during the app session.
| const {reset: resetClaimState, scanActionClaimChanged, address} = useClaim() | ||
| const processedActionRef = React.useRef<Links.CardanoActionClaim | null>(null) | ||
| // Track processed claim URLs to prevent re-processing | ||
| const processedClaimUrlsRef = React.useRef<Set<string>>(new Set()) |
There was a problem hiding this comment.
Missing cleanup for processed claims prevents retry
Medium Severity
The processedClaimUrlsRef Set is never cleared, unlike ActionHandler which clears its processedActionsRef when pendingAction becomes null. Once a claim is added to this Set, it cannot be re-triggered during the component's lifecycle, even if the claim fails downstream or is cancelled. Users would need to navigate away (unmounting the component) to retry the same claim.


https://emurgo.atlassian.net/browse/WAL-32
Note
Medium Risk
Changes how deep links and pending actions are deduplicated, which could alter when link actions execute (or get skipped) in edge cases around app restart, login, and wallet selection.
Overview
Reduces duplicate deep-link handling by tracking processed URLs in
useDeepLinkWatcher(for both initial URL on cold start and the post-login recheck) so the same URL isn’t re-parsed and re-queued multiple times.Simplifies
ActionHandler’s pending-action deduping from anactionId -> action objectmap to anactionIdset, and updates the processing gate to skip already-seen IDs.ClaimActionHandlersimilarly switches to a set keyed byurl:codeso claim links aren’t re-applied on screen refocus.Fixes
Countertext rendering to always include a leading space before optionalunitsText/closingTextwhen present.Written by Cursor Bugbot for commit c562c76. This will update automatically on new commits. Configure here.