TON-1682: demo wallet redesign#462
Conversation
Redesign of the demo wallet on top of current main: - New dashboard: balance total, assets list, header, and Swap / Send / Receive action row. - Reworked auth flow (password setup/unlock), wallet management and wallet-selector, receive flow, and connect-to-dApp modal. - New shared UI primitives (button, dialog, drawer, modal, select, popover, segmented, icons) and fallback-image handling. - Fiat balance via rates, jetton/NFT image arrays, and the toncenter jetton-master / address-book mappers.
Drop components left unused after the redesign (no importers): ActionPreviewList, CreateWallet, ImportWallet, LedgerSetup — the wallet create/import/ledger flows now live in features/wallet-setup and features/ledger.
Relocate cross-cutting hooks into core/hooks (kebab-case): useCountUp, useMediaQuery, usePasteHandler. Repoint consumers and drop them from the flat hooks barrel.
…ents/ui
Relocate the shared primitives into core/components/ui/{card,input,
fallback-image} with barrels, and repoint all consumers. Drop them
from the flat components barrel.
…hared
Relocate the app shells into core/components/shared/{layout,new-layout}
with barrels, and repoint all page consumers. Drop them from the flat
components barrel.
Relocate the flat lib/ directory (cn utils, env, constants, extension helpers) plus logger and isExtension into core/lib, and repoint all consumers including the dynamic extensionPopup import. The flat lib/ directory is gone.
Move StreamingStatus, DisconnectNotifications and the useReceivedToasts hook into features/notifications with barrels, and repoint AppRouter.
Move NftsCard into features/nft with barrels, and repoint WalletDashboard.
Move JettonRow, JettonFlow, JettonsCard, JettonsList, the useJettonInfo and useFormattedJetton hooks, and the jetton utils into features/jettons with barrels. Repoint consumers to @/features/jettons; internal cross-references stay relative.
Move the SendTransaction screen and the useSendToken / useGaslessJettonSend hooks into features/send with barrels. Repoint AppRouter to @/features/send and drop SendTransaction from the pages barrel.
Move the Swap screen, swap components (SwapInterface, SwapSettings, TokenInput, TokenSelector, QuoteTimer) and swap constants into features/swap with barrels. Repoint AppRouter and drop Swap from the pages barrel.
Move the Staking screen, StakingInfo and StakingInterface into features/staking with barrels. Repoint AppRouter and drop Staking from the pages barrel.
Move TracePage, TransactionDetail, TraceRow, RecentTransactions and the transaction card components into features/transactions with barrels. Repoint AppRouter and drop them from the pages/components barrels.
Move TonConnectRoute and the dApp connect/request modals (ConnectDappModal, ConnectRequestModal, DAppInfo, RequestModal, SignDataRequestModal, SignMessageRequestModal, TransactionRequestModal, TransactionRequestDetails) into features/ton-connect with barrels. Repoint AppRouter, WalletDashboard and DashboardHeader; drop them from the pages/components barrels.
Move SettingsDropdown and ToggleRow into features/settings with barrels. Repoint DashboardHeader and the Layout shell; drop them from the components barrel.
Move wallet management (WalletSwitcher, WalletSelectorModal, WalletRow, WalletPreview, Mnemonic* components), ReceiveModal, NetworkSelector and the bip39 word list into features/wallets with barrels. Repoint all consumers; drop them from the components barrel.
Move WalletDashboard and the dashboard components (DashboardHeader, DashboardActions, DashboardActionButton, DashboardAssets, DashboardAssetRow, BalanceTotal, AnimatedBalance) into features/dashboard with barrels. Repoint AppRouter and remove the now-empty pages/ barrel.
…nifest to core Move CircleLogo, LoaderCircle, SuccessCard, HoldToSignButton to core/components/ui; useTonWallet and useWalletDataUpdater to core/hooks; walletManifest to core/lib. Remove the empty flat hooks/ and utils/ barrels. Only the legacy Button remains in components/, pending its consolidation onto core/components/ui/button.
Repoint the last Button consumers to @/components/Button directly, delete the components/index.ts barrel, and drop the components re-export from the app index. Only Button.tsx remains flat, pending its consolidation onto core/components/ui/button.
Remove the legacy components/Button.tsx and point all consumers at the design-system button in core/components/ui/button. Rename the loading prop isLoading -> loading at every call site, and align HoldToSignButton and QuoteTimer to the same `loading` prop name. The flat components/ directory is now gone entirely.
Add a History block to the wallet dashboard showing the last 6 transactions (pending + events merged, newest first), with the same section header as Assets/NFTs and hidden while loading or empty (like NftsCard). Introduce a reusable TransactionRow list item — gray icon with a +/- glyph and a success/loading/failed status badge, title, truncated trace id, signed coloured amount and date — plus a map-transaction-row mapper, both to be reused by the full history page later. Existing transaction cards are left untouched.
Match the previous behaviour: tapping a transaction in the dashboard History block opens the Tonviewer transaction page in a new tab instead of the internal trace page. Pending (not-yet-on-chain) rows stay non-clickable, as before.
…rgeValue Derive transaction amounts from the typed action fields (TonTransfer / JettonTransfer raw amounts + jetton decimals) via formatUnits, then format for display with formatLargeValue (M/B/T abbreviation and locale separators), matching the appkit-react widgets. Add formatLargeValue to core/utils; the history mapper no longer uses formatTonForDisplay.
Drop the heuristic formatTonForDisplay helper entirely. Its two remaining consumers (legacy RecentTransactions and ActionCard) now derive amounts from raw values via formatUnits + formatLargeValue, consistent with the new history mapper.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedToo many files! This PR contains 297 files, which is 147 over the limit of 150. To get a review, narrow the scope: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (297)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
No description provided.