Skip to content

Implement Wallet Standard Integration#20

Merged
gitteri merged 4 commits intomainfrom
wallet-standard-impl
Jul 31, 2025
Merged

Implement Wallet Standard Integration#20
gitteri merged 4 commits intomainfrom
wallet-standard-impl

Conversation

@gitteri
Copy link
Copy Markdown
Collaborator

@gitteri gitteri commented Jul 31, 2025

Implement Wallet Standard Integration

Overview

This PR migrates the Mosaic UI from the legacy Solana Wallet Adapter to the modern Wallet Standard, providing future-proof wallet integration.

Key Changes

🔄 Wallet System Migration

  • Replaced: Solana Wallet Adapter → Wallet Standard
  • Added: New wallet connection and management system

🏗️ New Context Architecture

  • ChainContext.tsx & ChainContextProvider.tsx: Chain-aware context management (devnet/testnet/mainnet)
  • RpcContext.tsx & RpcContextProvider.tsx: RPC client management with automatic chain switching
  • SelectedWalletAccountContext.tsx & SelectedWalletAccountContextProvider.tsx: Wallet account selection and state management

💳 Enhanced Wallet Components

  • ConnectWalletMenu.tsx: Modern wallet selection dropdown
  • ConnectWalletMenuItem.tsx: Individual wallet connection items
  • WalletAccountIcon.tsx: Wallet-specific iconography
  • WalletMenuItemContent.tsx: Consistent wallet menu styling
  • UnconnectableWalletMenuItem.tsx: Graceful handling of unavailable wallets

🪙 Updated Token Creation

  • Enhanced stablecoin creation: Updated to use Wallet Standard signers
  • Improved error handling: Better transaction result management
  • Type safety: Stronger TypeScript integration with wallet standard types

🧪 Tested Functionality

  • ✅ Wallet connection/disconnection flow
  • ✅ Stablecoin creation with new wallet standard
  • ✅ TypeScript compilation passes
  • ✅ ESLint validation (1 intentional console warning)

Important

Migrates from Solana Wallet Adapter to Wallet Standard, adding new context management and wallet connection UI, and updates token creation to use Wallet Standard signers.

  • Wallet System Migration:
    • Replaced Solana Wallet Adapter with Wallet Standard.
    • Added new wallet connection and management system.
  • Context Architecture:
    • Added ChainContext.tsx and ChainContextProvider.tsx for chain-aware context management.
    • Added RpcContext.tsx and RpcContextProvider.tsx for RPC client management.
    • Added SelectedWalletAccountContext.tsx and SelectedWalletAccountContextProvider.tsx for wallet account selection.
  • Wallet Components:
    • Added ConnectWalletMenu.tsx, ConnectWalletMenuItem.tsx, and UnconnectableWalletMenuItem.tsx for wallet connection UI.
    • Added WalletAccountIcon.tsx for wallet-specific iconography.
  • Token Creation:
    • Updated stablecoin creation to use Wallet Standard signers in StablecoinCreateForm.tsx.
    • Improved error handling and type safety in stablecoin.ts.
  • Miscellaneous:
    • Updated package.json to include new dependencies for Wallet Standard and related libraries.
    • Updated layout.tsx to use new context providers for chain and wallet management.

This description was created by Ellipsis for fadaf0d. You can customize this summary. It will automatically update as commits are pushed.

Copy link
Copy Markdown
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Caution

Changes requested ❌

Reviewed everything up to 46c706f in 1 minute and 48 seconds. Click for details.
  • Reviewed 1135 lines of code in 19 files
  • Skipped 1 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/ui/src/context/SelectedWalletAccountContextProvider.tsx:119
  • Draft comment:
    Ensure that the 'setSelectedWalletAccount' function is stable. If it might change, include it as a dependency in the useMemo hook.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
2. packages/ui/src/components/ConnectWallet/UnconnectableWalletMenuItem.tsx:24
  • Draft comment:
    Typographical suggestion: The class name 'rt-DropdownMenuSubtriggerIcon' appears to have inconsistent casing compared to 'rt-BaseMenuSubTriggerIcon' used earlier. Consider renaming it to 'rt-DropdownMenuSubTriggerIcon' for consistency.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% Since this is a new file, the comment is about changed code. However, these appear to be classes from an external UI library (given the 'rt-' prefix). We shouldn't make assumptions about external library class names. The inconsistency might be intentional in the library itself. Without seeing the library's source code, we can't be sure this is actually an issue. The inconsistency could actually be a real bug if these are custom classes. I might be wrong about them being from an external library. Even if these are custom classes, the comment is speculative without seeing the full UI library code. We need stronger evidence to suggest a rename. Delete the comment as it makes assumptions about class naming without sufficient context to verify if it's actually an issue.

Workflow ID: wflow_uR4GzeK9GN9wpZNf

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Copy Markdown
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed fadaf0d in 1 minute and 23 seconds. Click for details.
  • Reviewed 295 lines of code in 5 files
  • Skipped 0 files when reviewing.
  • Skipped posting 5 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/ui/src/app/dashboard/create/stablecoin/StablecoinAuthorityParams.tsx:53
  • Draft comment:
    Good: onChange handlers have been simplified to one-liners. Ensure consistent styling across all inputs.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. packages/ui/src/app/dashboard/create/stablecoin/StablecoinBasicParams.tsx:31
  • Draft comment:
    Nice formatting improvement: consolidated label elements enhance readability.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
3. packages/ui/src/app/dashboard/create/stablecoin/StablecoinCreateForm.tsx:54
  • Draft comment:
    When using parseInt for decimals, include a radix (e.g. parseInt(..., 10)) for explicit base conversion.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
4. packages/ui/src/app/dashboard/create/stablecoin/StablecoinCreationResult.tsx:45
  • Draft comment:
    Result display uses conditional rendering and optional chaining appropriately.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
5. packages/ui/src/app/dashboard/create/stablecoin/page.tsx:28
  • Draft comment:
    Casting currentChain as solana:${string} works for now, but consider validating the format or making the type more explicit to avoid future issues.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_cNJ5xEM8OL0kQJ7H

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@gitteri gitteri merged commit c99d2ed into main Jul 31, 2025
2 checks passed
@gitteri gitteri deleted the wallet-standard-impl branch July 31, 2025 14:15
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