Skip to Content
Welcome to RitoSwap's documentation!
DAppPagesPortfolio

Portfolio Page

The Portfolio page is a multichain, multi-wallet portfolio viewer. It supports nine included EVM chains simultaneously for native token balances, ERC-20s (well-established ones only) and ERC-721 and ERC-1155 assets with image and meta data property display. To conserve resources, this setup is designed for users looking at their own assets, it is NOT a public look up for any other users’ addresses; users must sign in and connect their own addresses to search their assets. Users can experience their assets in a RitoVision Blade Runner–esque branded vibe with some classic crypto music!

View Live Page
⚠️

Users must connect their wallet addresses to view portfolios; public lookup of addresses not owned by the user is, by design, not supported.

File Paths

        • PortfolioClient.tsx
        • page.tsx
        • page.module.css
        • metadata.ts
          • useAssets.ts

Components of Note

ComponentLocationPurpose
AssetDisplayapp/portfolio/components/assets/AssetDisplay.tsxRenders a card for a single token or NFT, showing its image, name, and balance or metadata.
AssetsGridapp/portfolio/components/assets/AssetsGrid.tsxArranges all your fetched assets into a neat grid, with friendly messages when loading or when no assets are found.
NativeBalanceapp/portfolio/components/assets/NativeBalance.tsxDisplays your wallet’s balance of the network’s native currency in a clear, formatted way.
TokenAccordionContentapp/portfolio/components/assets/TokenAccordionContent.tsxShows a collapsible panel that lists your tokens for a chosen network and lets you load more as needed.
Musicapp/portfolio/components/music/Music.tsxEmbeds the “Hodeler” track for portfolio-checking ambiance.
ChainWrapperapp/portfolio/components/organize/ChainWrapper.tsxWraps each chain’s asset list with headers and styling.
ChainAccordionapp/portfolio/components/organize/ChainAccordion.tsxGroups assets by blockchain chain into collapsible sections.
Placeholderapp/portfolio/components/organize/Placeholder.tsxDisplays a loading or empty-state placeholder.
TokenAccordionapp/portfolio/components/organize/TokenAccordion.tsxManages expand/collapse behavior for token lists.
AccountDropdownapp/portfolio/components/selection/AccountDropdown.tsxLets the user view their connected wallet addresses or connect a new wallet via a simple dropdown.
SelectAccountapp/portfolio/components/selection/SelectAccount.tsxHandles showing the account dropdown and opening the wallet connect modal when no address is selected.
SelectChainapp/portfolio/components/selection/SelectChain.tsxDisplays a list of supported blockchains as selectable items so users can choose which networks to include.
SelectTokenapp/portfolio/components/selection/SelectToken.tsxPresents checkboxes for ERC-20, ERC-721, and ERC-1155 so users can filter by token type.
useAssetsapp/portfolio/hooks/useAssets.tsRetrieves and paginates token assets for a wallet.
PortfolioClientapp/portfolio/PortfolioClient.tsxCoordinates the account, chain, and token selectors and displays the resulting portfolio.

Music

This page features “Hodeler”, Rito Rhymes’ parody remix of Kanye West’s Gold Digger. It’s an anthemic track about relationships with crypto traders and hodling; it’s perfect ambiance for checking your portfolio.


docs/content/dapp/portfolio-ui/index.mdx — Overview explaining the structure of the portfolio page’s components.

Portfolio UI Overview