Skip to content

refactor(wallet): fix the review findings of the wallet consolidation - #1913

Open
zancas wants to merge 4 commits into
devfrom
fix/1910-review
Open

zancas wants to merge 4 commits into
devfrom
fix/1910-review

Conversation

@zancas

@zancas zancas commented Nov 10, 2026

Copy link
Copy Markdown
Member

This PR fixes the five review findings on #1910. It targets the branch of #1910.

Changes

  • app/wallet holds one module for each domain: address, balance, pool, send, transfer and keys. The types, enums and classes modules are deleted.
  • app/wallet imports neither app/AppState nor app/walletBackend. Both of them import app/wallet.
  • The @app/AppState barrel exports its own names only. Each wallet name has one import path, @app/wallet/<domain>.
  • Each file imports a wallet module one time.
  • The wallet enums are literal unions: ValueTransferKind, ValueTransferStatus, Pool, AddressKind, AddressScope. The string values are unchanged.
  • WalletErrorInfo is a discriminated union. The 'chain' kind carries walletChain.
  • WalletErrorInfo and DeleteWalletContext return to app/AppState/types. FilterKind moves to screens/History/components/Filters.tsx.
  • The restore branch in LoadingApp calls the existing isViewingKey.
  • TransactionType, TxDetailType, TransactionTypeEnum and AddressUnifiedTypeEnum had zero users and are deleted.

Tests

scripts/module_rules.ts holds five pure functions. Each function returns a discriminated union.

tsc, eslint, prettier --check and all 285 Jest suites pass locally.

Out of scope

The five classes in app/wallet remain classes. The change of each class to a type with functions is a separate task.

🤖 Generated with Claude Code

Base automatically changed from refactor/wallet-declarations to dev November 10, 2026 05:12
@github-actions

Copy link
Copy Markdown

Visual review — ✅ matches baseline

Head vs visual/__baseline__. Open the review page — Current, Animations, and Image diffs tabs.

zancas and others added 2 commits November 9, 2026 21:19
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
zancas and others added 2 commits November 9, 2026 21:26
…r kinds

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…he Pools screen

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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