Skip to content

feat(wallet): revamp wallet home UI and support interactions#6426

Open
SeniorZhai wants to merge 66 commits into
masterfrom
feat/wallet-home-revamp
Open

feat(wallet): revamp wallet home UI and support interactions#6426
SeniorZhai wants to merge 66 commits into
masterfrom
feat/wallet-home-revamp

Conversation

@SeniorZhai

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR revamps the wallet home experience by introducing a Compose-based “card” layout (balance, banners, tokens, transactions, positions/top movers, referral, support) and adding an “All Tokens” page, alongside data plumbing (DAO/repository/view-model methods) and localized strings/assets needed for the new UI.

Changes:

  • Add Compose wallet home framework (state, builder, card components, RecyclerView interop) and integrate it into Privacy and Classic wallet fragments with lightweight caching.
  • Add a dedicated “All Tokens” screen + navigation/activity destinations for privacy and web3 wallets.
  • Extend repositories/DAOs/view-models to support preview-limited token/transaction queries and referral status checks; add new localized strings and drawable assets.

Reviewed changes

Copilot reviewed 46 out of 46 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
app/src/test/java/one/mixin/android/ui/wallet/home/WalletHomeBuilderTest.kt Adds unit tests for wallet home card ordering and preview limits.
app/src/main/res/values/strings.xml Adds wallet-home UI strings (EN) and help-center URL.
app/src/main/res/values-zh-rTW/strings.xml Adds wallet-home UI strings (zh-TW) and help-center URL.
app/src/main/res/values-zh-rCN/strings.xml Adds wallet-home UI strings (zh-CN) and help-center URL.
app/src/main/res/navigation/nav_wallet.xml Adds navigation destination for the “All Tokens” fragment.
app/src/main/res/layout/item_wallet_asset.xml Updates wallet asset row sizing/alignment for new layouts.
app/src/main/res/layout/fragment_wallet_home_all_tokens.xml New layout hosting a title bar and ComposeView for All Tokens.
app/src/main/res/layout/fragment_privacy_wallet.xml Wraps existing RecyclerView and adds ComposeView for new home UI.
app/src/main/res/drawable/ic_wallet_home_referral.xml New referral icon asset for wallet home.
app/src/main/res/drawable/ic_wallet_home_referral_gift.xml Adds additional referral-related icon asset.
app/src/main/res/drawable/ic_wallet_home_help_center.xml Adds help-center icon asset.
app/src/main/res/drawable/ic_wallet_home_fund.xml Adds empty-state “fund wallet” icon asset.
app/src/main/res/drawable/ic_wallet_home_external_link.xml Adds external-link icon asset for support/help items.
app/src/main/res/drawable/ic_wallet_home_buy.xml Adds buy/cashback banner icon asset.
app/src/main/res/drawable/ic_wallet_home_add.xml Adds add-wallet banner icon asset.
app/src/main/res/drawable/ic_wallet_close.xml Adds close icon used by banners.
app/src/main/res/drawable/ic_wallet_arrow_right.xml Adjusts arrow tint to match updated UI palette.
app/src/main/res/drawable/bg_wallet_reffal.xml Adds referral banner background art.
app/src/main/java/one/mixin/android/vo/SnapshotItem.kt Fixes serialized name mapping for collection_hash.
app/src/main/java/one/mixin/android/ui/wallet/WalletViewModel.kt Adds referral check + preview-limited token/snapshot methods for home UI.
app/src/main/java/one/mixin/android/ui/wallet/WalletHomeAllTokensFragment.kt New fragment implementing All Tokens UI + actions for privacy/web3.
app/src/main/java/one/mixin/android/ui/wallet/WalletActivity.kt Adds destinations and intent wiring for All Tokens screens.
app/src/main/java/one/mixin/android/ui/wallet/PrivacyWalletFragment.kt Integrates Compose wallet home, caching, and new section data sources.
app/src/main/java/one/mixin/android/ui/wallet/home/WalletHomeState.kt Introduces wallet home state model + callback interface for Compose UI.
app/src/main/java/one/mixin/android/ui/wallet/home/WalletHomeSection.kt Adds preview count/“has more” helpers and limits.
app/src/main/java/one/mixin/android/ui/wallet/home/WalletHomeRecyclerInterop.kt Adds RecyclerView interop composables for token/tx/position lists.
app/src/main/java/one/mixin/android/ui/wallet/home/WalletHomePage.kt Adds top-level Compose page renderer for wallet home cards.
app/src/main/java/one/mixin/android/ui/wallet/home/WalletHomeItem.kt Adds enums for wallet home types and card types.
app/src/main/java/one/mixin/android/ui/wallet/home/WalletHomeCache.kt Adds shared-preferences cache for quick wallet home initial rendering.
app/src/main/java/one/mixin/android/ui/wallet/home/WalletHomeBuilder.kt Adds card ordering builder logic used by wallet home and cache.
app/src/main/java/one/mixin/android/ui/wallet/home/components/WalletHomeCard.kt Implements per-card rendering and section wrappers.
app/src/main/java/one/mixin/android/ui/wallet/home/components/WalletHomeAllTokensPage.kt Implements Compose All Tokens page (balance header + full list).
app/src/main/java/one/mixin/android/ui/wallet/home/components/SupportAndFooter.kt Implements support card + import-safety footer content.
app/src/main/java/one/mixin/android/ui/wallet/home/components/SectionCard.kt Implements reusable section header + “view all” row.
app/src/main/java/one/mixin/android/ui/wallet/home/components/BannerCards.kt Implements banner pager and referral banner card UI.
app/src/main/java/one/mixin/android/ui/wallet/home/components/BalanceCard.kt Implements balance card and empty guide UI/actions.
app/src/main/java/one/mixin/android/ui/wallet/ClassicWalletFragment.kt Integrates Compose wallet home for web3/classic wallet, caching, and previews.
app/src/main/java/one/mixin/android/ui/home/web3/Web3ViewModel.kt Adds referral check + preview-limited token/transaction accessors.
app/src/main/java/one/mixin/android/ui/home/MainActivity.kt Makes handlerCode public (visibility change).
app/src/main/java/one/mixin/android/repository/Web3Repository.kt Adds top tokens + recent transactions loader with token symbol enrichment.
app/src/main/java/one/mixin/android/repository/TokenRepository.kt Adds recent snapshots and top token queries for wallet home previews.
app/src/main/java/one/mixin/android/repository/ReferralRepository.kt Adds API call to determine whether user has been invited (for referral banner).
app/src/main/java/one/mixin/android/db/web3/Web3TransactionDao.kt Adds DAO query for recent web3 transactions (limited).
app/src/main/java/one/mixin/android/db/web3/Web3TokenDao.kt Adds DAO query for top web3 tokens (limited).
app/src/main/java/one/mixin/android/db/TokenDao.kt Adds DAO query for top non-hidden tokens (limited).
app/src/main/java/one/mixin/android/db/SafeSnapshotDao.kt Adds DAO query for recent snapshots across assets (limited).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}
private val walletId by lazy { requireArguments().getString(ARGS_WALLET_ID).orEmpty() }
private val _walletId = MutableLiveData<String>()
private val homeState = MutableStateFlow(WalletHomeState(walletType = WalletHomeType.PRIVACY))
Comment on lines +162 to +165
<fragment
android:id="@+id/wallet_home_all_tokens_fragment"
android:name="one.mixin.android.ui.wallet.WalletHomeAllTokensFragment"
tools:layout="@layout/fragment_compose" />
Comment on lines 7 to 11
<RelativeLayout
android:id="@+id/background_rl"
android:layout_width="match_parent"
android:layout_height="84dp"
android:layout_height="match_parent"
android:background="@color/wallet_green">
Comment on lines +186 to +188
Image(
painter = painterResource(id = R.drawable.bg_wallet_reffal),
contentDescription = null,
Comment on lines +38 to +43
Column(
modifier = Modifier
.fillMaxSize()
.background(MixinAppTheme.colors.backgroundWindow)
.verticalScroll(rememberScrollState()),
) {
Comment on lines +62 to +72
private fun WalletHomeCache.toState(): WalletHomeState {
val cards = WalletHomeBuilder.build(
walletType = walletType,
hasAssetValue = true,
showBanner = false,
showReferral = false,
hasPositions = false,
hasTopMovers = false,
hasTransactions = totalTransactionCount > 0,
isLoading = false,
)
@SeniorZhai SeniorZhai force-pushed the feat/wallet-home-revamp branch from 9faae78 to 91da276 Compare June 4, 2026 08:40
@SeniorZhai SeniorZhai force-pushed the feat/wallet-home-revamp branch from 91da276 to c209609 Compare June 4, 2026 09:09
@SeniorZhai SeniorZhai force-pushed the feat/wallet-home-revamp branch 2 times, most recently from 11401b3 to 4994d39 Compare June 8, 2026 08:59
@SeniorZhai SeniorZhai force-pushed the feat/wallet-home-revamp branch from e9f5a2a to 15b1670 Compare June 8, 2026 09:15
@SeniorZhai SeniorZhai force-pushed the feat/wallet-home-revamp branch from ca5b26e to f27ca40 Compare June 10, 2026 09:01
@SeniorZhai SeniorZhai marked this pull request as ready for review June 11, 2026 12:58
@SeniorZhai SeniorZhai force-pushed the feat/wallet-home-revamp branch from 2e12716 to 0528cac Compare June 12, 2026 00:29
@SeniorZhai SeniorZhai force-pushed the feat/wallet-home-revamp branch from 1a523f3 to 0cd9cdc Compare June 12, 2026 07:14
crossle and others added 2 commits June 13, 2026 18:02
Render the all-tokens list with a LazyColumn so only visible rows compose instead of eagerly composing the entire token list, and drop the redundant one-shot raw query on entry, relying on the LiveData observer to avoid a duplicate full-table join and sort.
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.

3 participants