Skip to content

Comments

preview#4467

Merged
jorbuedo merged 10 commits intopreviewfrom
develop
Jan 29, 2026
Merged

preview#4467
jorbuedo merged 10 commits intopreviewfrom
develop

Conversation

@jorbuedo
Copy link
Contributor

@jorbuedo jorbuedo commented Jan 29, 2026

Note

Medium Risk
Medium risk because it changes migration/storage recovery behavior (including clearing data while preserving keystore) and alters deep-link parsing/execution to auto-switch networks, which can impact wallet availability and transfer flows.

Overview
Improves startup resilience by adding storage integrity checks, timeouts, and automatic recovery during migrations: runMigrations now validates MMKV/AsyncStorage health and attempts recovery, useMigrations enforces a 60s timeout, retries on critical failures, and can clear recoverable data while preserving keystore/.

Adds wallet metadata recovery via recoverOrphanedWallets (rebuilds missing wallet/ metas from keystore/ xpub/xpriv) and makes WalletManagerHydrationWrapper/WalletManager.hydrate more defensive (timeouts + error-handling to avoid app hangs).

Enhances Cardano deep-link support by attaching an optional network to relevant CardanoAction types, detecting mainnet vs preprod from addresses (including decimal amounts), and auto-switching the selected network before executing link actions; includes new tests and Android link test cases for decimal precision. Also bumps app version to 7.0.3.

Written by Cursor Bugbot for commit f922c87. This will update automatically on new commits. Configure here.

@jorbuedo jorbuedo merged commit 44c5af5 into preview Jan 29, 2026
2 of 3 checks passed
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

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.

'network' in cardanoAction ? cardanoAction.network : undefined
if (actionNetwork && actionNetwork !== currentNetwork) {
walletManager.setSelectedNetwork(actionNetwork)
}
Copy link

Choose a reason for hiding this comment

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

Network switch race condition in deep link handling

High Severity

When processing deep links with a different network (e.g., a preprod address when user is on mainnet), walletManager.setSelectedNetwork(actionNetwork) is called but returns immediately without waiting for completion. The setSelectedNetwork method triggers an async hydrateFn() that reloads wallets and only updates the network state in its .then() callback. The code then immediately processes the action (setting transfer state, navigating) before the network switch completes. This could result in transactions being prepared against the wrong network context.

Additional Locations (1)

Fix in Cursor Fix in Web

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.

1 participant