Add migrate to world popup#1025
Open
ChewingGlass wants to merge 38 commits into
Open
Conversation
ChewingGlass
requested review from
Perronef5,
allenan and
tyler-whitman
and removed request for
a team
March 20, 2026 15:52
bryzettler
approved these changes
Mar 20, 2026
Final-review fixes: - Pending txs (poll timed out mid-confirmation) are no longer counted as failed. summarizeBatch splits pending from terminal-failed; the executor returns a 'pending' outcome and the UI shows honest "still processing" messaging instead of a false-failure retry screen. - Persist a resumable 'running' snapshot before the first batch confirms, so an app kill during batch-1 confirmation stays resumable. - deriveResume surfaces confirmed/failed counts so a resumed session shows real progress instead of 0/0.
A resumable session with no failures (interrupted mid-confirmation, or a poll that timed out still-pending) persists as 'running'. On relaunch it was routed to the retry-failed screen showing "0 need a retry" — the same false-failure framing the pending outcome removed for the in-session path. Resume now shows the honest "still processing" screen unless there are real failures. PendingStep no longer depends on a pending count it can't know on resume.
- self-custody path now gives branched wallet-connect instructions (ConnectStep) instead of private-key export; offered from Settings flow intro as well as the announcement modal - empty-wallet short-circuit to a nothing-to-migrate state - OTP resend with backoff; Privy wallet-creation retry + support path - executor: request/submit retry with backoff, network-loss auto-pause via waitForOnline, per-batch nextInput persisted so resume starts at the last unconfirmed batch - clear finished sessions; tokens card shows approx USD value - revert scope-creep axios pre-check in SolanaMigration.tsx
- single source for world purple and step green (theme.ts hex) - shared WorldButton / StepBackHeader / OutcomeStep chrome - signersOrDefault helper replaces triplicated fallback - typed signBatch items, drop re-deserialization middle-man - selectedTokens helper, named ResumeInfo type, @utils/logger alias - i18n the modal back label; metro forceSingleCopy helper - move flow-step state out of useMigrationSession
- unify TransactionData/MigrationTransaction into logic/types.ts; make runMigration generic over the signed-tx type — zero casts left in useMigrationExecutor - reuse deserializeBatchTxs in the executor hook - RunOutcome carries nextInput so same-session partial/pending retry resumes from the failed batch, not batch 1 - extract resendBackoffSeconds/shouldShowSupport into logic/retry.ts and add the spec-mandated error-state tests - dedupe the modal dismiss button; type SettingsNavigator params so the modal's navigate() needs no 'as any'
- reuse @utils/sleep, canonical mint constants, shared BatchStatus, and @helium/blockchain-api MigrateInput type - signBatch takes transaction data directly; signers fallback lives in one place - derive the progress label from executor progress (reset on run) - gate all network deps on connectivity via gateOnDeps and make the NetInfo waiter cancellable on unmount - single stepForOutcome mapping for run and resume screens (failed sessions no longer resume to the pending screen) - wallet-creation failure is a walletError flow step, not a render override - batch the migrate-dismissed AsyncStorage read with its neighbor at startup - drop dead i18n keys, unused WORLD tokens, unused hook surface, dead RunOutcome fields; dedupe metro forceSingleCopy branches
- persist next batch input before snapshot so crash-resume never re-requests confirmed work - retry pollStatus with backoff like the other API calls - surface asset-load errors with retry instead of rendering nothing-to-migrate - track wallet-create attempts in state so the support link appears past the threshold - add dismiss action to the wallet-create error step - move World palette colors into theme and use Restyle props - dedupe WORLD_URL into a shared constant - i18n the migration progress label and email placeholder
- surface in-flight migration sessions at app open, ahead of the announcement modal - recover login/wallet-create path when retrying without a destination wallet - exclude NFT accounts from the left-behind token count - inline worldPurple hex and drop the dead worldPurpleHex export - extract shared WorldLoader and a dismiss WorldButton variant - move SUPPORT_URL to constants, unify error text color, rename OutcomeScreen type - add OTP resend schedule and NFT-classification tests
- make useMigrationSession a live view of the persisted session; drop the component's shadow lastRunNextInput/outcome state - pass an explicit return step to execute instead of inferring from state - move the destination-wallet guard into execute so Confirm and Retry share it - gate the app-open resume check on session load to kill the modal timer race - delete write-only session.batch, unused maxRaw/pendingSignatures/warnings - reuse TERMINAL_STATUSES, shared shortenMint, store-read token prices - keep token amount edits local to the sheet until close; add light WorldButton variant
- persist the submitted batchId with in-flight snapshots; a pending resume re-polls that batch to terminal before re-requesting, so an unconfirmed token transfer can't be rebuilt and double-sent - route post-login back to the resume outcome screen instead of fresh selection - reword partial/pending counts to transfers (signatures, not items) - shared getEmbeddedWallet helper, WORLD_INPUT text style, OutcomeStep composition for success/nothing-to-migrate screens - fold decorative glyphs into i18n strings; uppercase palette hexes
…fetching Replace NothingToMigrate/PartialRetry/Pending step components with the shared OutcomeStep, move FlowStep state and resume routing into useMigrationSession, and fetch migration assets only once the flow passes the intro/connect/login steps. Extract a resolveTo helper in metro.config.js.
- Remove the NetInfo connectivity gate that could deadlock the run indefinitely (NetInfo.fetch never resolved), parking every migration before a single transaction was requested - Skip retries for permanent (4xx) API errors so rejections like an allowlist denial surface immediately instead of after 3 backoffs - Show run errors next to the CTA on the review/outcome screens - Restyle the migration flow (launcher, path-choice, tokens/hotspots sheets, review, progress) to the World design
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.
No description provided.