Skip to content

sync main#3251

Merged
ca333 merged 2 commits intomainfrom
dev
Oct 26, 2025
Merged

sync main#3251
ca333 merged 2 commits intomainfrom
dev

Conversation

@ca333
Copy link
Copy Markdown
Contributor

@ca333 ca333 commented Oct 26, 2025

NFT tweaks

Summary by CodeRabbit

Release Notes

  • New Features

    • Added swipe-back gesture navigation in coin details view.
  • Improvements

    • Optimized NFT chain handling to process only activated chains.
    • Added messaging to prompt users to enable NFT chains for viewing NFTs.

@ca333 ca333 merged commit a704a31 into main Oct 26, 2025
5 of 11 checks passed
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Oct 26, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The changes refactor NFT chain handling to filter operations only to chains whose parent coins are already activated, rather than attempting automatic activation. A new UI widget prompts users to enable NFT chains when none are available. Gesture-based back-navigation is added to coin details.

Changes

Cohort / File(s) Summary
NFT chain filtering logic
lib/bloc/nfts/nft_main_bloc.dart, lib/bloc/nfts/nft_main_repo.dart
Modified _calculateNftCount to only include chains present in nfts map; refactored updateNft and getNfts to filter chains via new _getActivatedChains method, which returns only chains with already-activated parent coins; removed automatic _activateParentCoins logic.
NFT UI for disabled chains
lib/views/nfts/nft_main/nft_main.dart, lib/views/nfts/common/widgets/nft_no_chains_enabled.dart
Introduced NftNoChainsEnabled widget displaying prompt to enable NFT protocol assets; updated nft_main.dart to conditionally render UI based on enabled chains and show placeholder when authenticated but no chains enabled.
Gesture-based navigation
lib/views/wallet/coin_details/coin_details.dart
Wrapped coin details content in GestureDetector to detect left-to-right swipe gestures and invoke back-navigation callback when on info page.

Sequence Diagram

sequenceDiagram
    participant UI as NFT Main UI
    participant Bloc as NFT Main Bloc
    participant Repo as NFT Main Repo
    participant Chains as Chain Manager

    rect rgb(220, 240, 255)
    Note over Repo: Old Flow: Try to activate
    Repo->>Repo: _activateParentCoins()
    Repo->>Chains: Enable all NFT chains
    Repo->>Repo: Fetch/Update NFTs
    end

    rect rgb(240, 220, 255)
    Note over Repo: New Flow: Filter to already-activated
    Repo->>Chains: Get known coins & activated coins
    Repo->>Repo: _getActivatedChains() filters
    Repo->>Chains: Enable only activated parent chains
    Repo->>Repo: Fetch/Update NFTs
    end

    alt Has enabled chains
    Bloc-->>UI: Show NftTabsContainer
    else No enabled chains
    Bloc-->>UI: Show NftNoChainsEnabled
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • nft_main_repo.dart: Logic change from automatic activation to conditional filtering requires careful verification of the filtering condition and impact on NFT availability detection.
  • nft_main_bloc.dart: Changes to _calculateNftCount logic affect downstream chain sorting and UI state; verify behavior with zero and multiple chains.
  • nft_main.dart: Conditional rendering branches based on hasEnabledChains flag; ensure fallback UI displays correctly across screen sizes and states.
  • nft_no_chains_enabled.dart: New widget; verify UI layout and messaging are appropriate.
  • coin_details.dart: Gesture detection edge cases; verify swipe threshold and interaction with other navigation gestures.

Possibly related PRs

Suggested labels

bug, QA

Suggested reviewers

  • takenagain
  • smk762
  • CharlVS

Poem

🐰 No more chains forced awake in the night,
Only activated ones shine so bright,
A gentle swipe takes us back with such grace,
NFTs now show their proper place. ✨

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a28811d and 2254a8f.

📒 Files selected for processing (5)
  • lib/bloc/nfts/nft_main_bloc.dart (1 hunks)
  • lib/bloc/nfts/nft_main_repo.dart (2 hunks)
  • lib/views/nfts/common/widgets/nft_no_chains_enabled.dart (1 hunks)
  • lib/views/nfts/nft_main/nft_main.dart (5 hunks)
  • lib/views/wallet/coin_details/coin_details.dart (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 2254a8f):

https://walletrc--pull-3251-merge-12wskp17.web.app

(expires Sun, 02 Nov 2025 15:37:13 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: f66a4ff03faa546f12f0ae5a841bd9eff2714dcc

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