Skip to content

Disable Migrate Wallets when no assets to migrate#5984

Merged
j0ntz merged 2 commits intodevelopfrom
jon/fix/disable-empty-migrate
Mar 20, 2026
Merged

Disable Migrate Wallets when no assets to migrate#5984
j0ntz merged 2 commits intodevelopfrom
jon/fix/disable-empty-migrate

Conversation

@j0ntz
Copy link
Contributor

@j0ntz j0ntz commented Mar 19, 2026

Description

Asana task

Disable the "Migrate Wallets" button in Settings when there are no assets available to migrate, matching the existing "Restore Wallets" disabled pattern. Also filter compromised-key wallet IDs through the same eligibility check so the migrate modal is never shown for wallets with no migratable assets.

Extracts the migrate-wallet eligibility logic into a shared getMigrateWalletItemList utility to avoid duplicating the filtering rules across SettingsScene, WalletActions, and MigrateWalletSelectCryptoScene.

Closes https://app.asana.com/1/9976422036640/project/1200972350208303/task/1211114363135206

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

Note

Medium Risk
Moderate risk because it changes eligibility logic that gates the wallet migration flow and affects compromised-key handling/navigation; mistakes could incorrectly hide migration or preselect wrong wallets.

Overview
Disables the Settings Migrate Wallets row when there are no eligible non-zero assets to migrate, matching the existing disabled behavior for Restore Wallets.

Extracts and centralizes migration eligibility into getMigrateWalletItemList, and updates migration-related scenes/actions to use a single createWalletId field (instead of an array) and to only show the compromised-key migration modal / preselect wallets that actually have migratable assets.

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

Address pre-existing strict-boolean-expressions and
use-unknown-in-catch-callback-variable violations exposed by
ESLint warning graduation.
Copy link
Contributor

@samholmes samholmes left a comment

Choose a reason for hiding this comment

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

approved with nits

@j0ntz
Copy link
Contributor Author

j0ntz commented Mar 20, 2026

Both nits addressed: renamed createWalletIds to singular createWalletId in MigrateWalletItem and removed unnecessary new Set.

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.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Move the migrate-wallet eligibility logic from
MigrateWalletSelectCryptoScene into a shared utility so it can be
reused in SettingsScene and WalletActions.
@j0ntz j0ntz force-pushed the jon/fix/disable-empty-migrate branch from 990ff18 to 18a3c1b Compare March 20, 2026 01:11
@j0ntz j0ntz merged commit 1f1a8b1 into develop Mar 20, 2026
4 checks passed
@j0ntz j0ntz deleted the jon/fix/disable-empty-migrate branch March 20, 2026 02:44
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.

2 participants