Skip to content

feat: aleo nexus support#933

Open
troykessler wants to merge 7 commits intomainfrom
feat/aleo-nexus-support
Open

feat: aleo nexus support#933
troykessler wants to merge 7 commits intomainfrom
feat/aleo-nexus-support

Conversation

@troykessler
Copy link
Contributor

@troykessler troykessler commented Feb 6, 2026

This PR adds aleo support for the nexus ui

Summary by CodeRabbit

  • New Features
    • Integrated Aleo wallet support, enabling users to connect and interact with their Aleo wallets.

@troykessler troykessler self-assigned this Feb 6, 2026
@vercel
Copy link

vercel bot commented Feb 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hyperlane-warp-template Ready Ready Preview, Comment Feb 6, 2026 4:27pm
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
analytics-test Ignored Ignored Feb 6, 2026 4:27pm
injective-bridge Ignored Ignored Feb 6, 2026 4:27pm
nexus-bridge Ignored Ignored Feb 6, 2026 4:27pm
ousdt-bridge Ignored Ignored Feb 6, 2026 4:27pm
trump-bridge Ignored Ignored Feb 6, 2026 4:27pm

Request Review

@troykessler
Copy link
Contributor Author

Waiting for the newest registry release containing the newest aleo routes, but the pr can already be reviewed

@coderabbitai
Copy link

coderabbitai bot commented Feb 6, 2026

📝 Walkthrough

Walkthrough

This pull request adds Aleo wallet integration to the application. Changes include updating the Next.js webpack configuration to support server-specific module aliasing, adding Aleo wallet adapter dependencies, registering Aleo as a supported protocol, and wrapping the app with AleoWalletProvider to expose wallet context throughout the component tree.

Changes

Cohort / File(s) Summary
Build Configuration
next.config.js
Updated webpack hook to accept { isServer } parameter; added asyncWebAssembly and layers experiments; introduced conditional server-side module aliasing to disable @provablehq packages on server builds.
Dependencies
package.json
Added @provablehq/aleo-wallet-adaptor-react and @provablehq/aleo-wallet-adaptor-shield at version 0.3.0-alpha.1.
Protocol Configuration
src/consts/config.ts
Added ProtocolType.Aleo to the walletProtocols array.
App Integration
src/pages/_app.tsx
Imported AleoWalletProvider and ShieldWalletAdapter; wrapped AppLayout with AleoWalletProvider context provider and configured wallet adapter instance.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🧅 Layers deep, we build this way,
Aleo wallets come to stay,
Provider wraps the app so tight,
Server builds need no Provable light,
Config bends without a fight!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: aleo nexus support' directly summarizes the main change across all files—adding Aleo wallet integration and protocol support throughout the codebase.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/aleo-nexus-support

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@src/pages/_app.tsx`:
- Around line 21-24: Create a dedicated AleoWalletContext component (e.g.
src/features/wallet/context/AleoWalletContext.tsx) that wraps AleoWalletProvider
instead of importing/instantiating adapters in _app.tsx; move the
ShieldWalletAdapter creation into a useMemo() inside that context (mirroring
SolanaWalletContext) so adapters are only constructed on the client and not at
module load/SSR time, export the context component and replace the direct
provider usage in _app.tsx with <AleoWalletContext> so SSR-safe lazy
initialization is enforced for ShieldWalletAdapter and AleoWalletProvider.

Comment on lines +21 to +24
import { AleoWalletProvider } from '@provablehq/aleo-wallet-adaptor-react';
import { ShieldWalletAdapter } from '@provablehq/aleo-wallet-adaptor-shield';

const wallets = [new ShieldWalletAdapter()];
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, let's see what wallet context files exist
fd "Context" --type f -e tsx --search-path src/features/wallet/

Repository: hyperlane-xyz/hyperlane-warp-ui-template

Length of output: 341


🏁 Script executed:

# Check the structure of src/pages/_app.tsx to verify the details
wc -l src/pages/_app.tsx

Repository: hyperlane-xyz/hyperlane-warp-ui-template

Length of output: 105


🏁 Script executed:

# Read the relevant sections of _app.tsx
sed -n '1,70p' src/pages/_app.tsx

Repository: hyperlane-xyz/hyperlane-warp-ui-template

Length of output: 2930


🏁 Script executed:

# Search for other wallet provider integrations to understand the pattern
rg "WalletProvider|WalletContext" src/pages/_app.tsx -B 2 -A 2

Repository: hyperlane-xyz/hyperlane-warp-ui-template

Length of output: 1685


🏁 Script executed:

# Let's examine one of the existing wallet context files to understand the pattern
cat -n src/features/wallet/context/SolanaWalletContext.tsx

Repository: hyperlane-xyz/hyperlane-warp-ui-template

Length of output: 2204


🏁 Script executed:

# Check the CosmosWalletContext as another reference
head -40 src/features/wallet/context/CosmosWalletContext.tsx

Repository: hyperlane-xyz/hyperlane-warp-ui-template

Length of output: 1973


🏁 Script executed:

# Search for where ShieldWalletAdapter might have browser API dependencies
rg "window|document|localStorage" src/pages/_app.tsx

Repository: hyperlane-xyz/hyperlane-warp-ui-template

Length of output: 157


🏁 Script executed:

# Check if any other wallet adapters are instantiated at module level
rg "new.*Adapter\(\)" src/pages/_app.tsx

Repository: hyperlane-xyz/hyperlane-warp-ui-template

Length of output: 128


🏁 Script executed:

# Check if there are any other adapters instantiated at module scope
rg "const.*=.*\[new" src/pages/_app.tsx

Repository: hyperlane-xyz/hyperlane-warp-ui-template

Length of output: 128


🏁 Script executed:

# Look at how EvmWalletContext handles wallet initialization
head -50 src/features/wallet/context/EvmWalletContext.tsx

Repository: hyperlane-xyz/hyperlane-warp-ui-template

Length of output: 1761


🏁 Script executed:

# Check the overall structure to see if Aleo is the only one doing direct instantiation
grep -n "WalletContext\|WalletProvider\|Adapter()" src/pages/_app.tsx | head -30

Repository: hyperlane-xyz/hyperlane-warp-ui-template

Length of output: 1173


Create a dedicated AleoWalletContext to match the established pattern and fix the SSR instantiation issue.

Every other wallet protocol — Solana, Cosmos, EVM, Starknet, Radix — has its own tidy context component in src/features/wallet/context/. Aleo's just plunked straight into _app.tsx with direct provider imports and module-level adapter instantiation. That's out of step with the rest of the codebase.

The bigger problem: const wallets = [new ShieldWalletAdapter()] (line 24) runs at module load time, before the component tree even renders. That means it executes during SSR setup, even though the provider is never actually rendered when isSsr is true. If the adapter constructor touches browser-only APIs, it'll break server-side rendering.

Compare with SolanaWalletContext (lines 23–35), which creates adapters inside useMemo() — that keeps them lazy and safe. Do the same here: create src/features/wallet/context/AleoWalletContext.tsx, wrap the provider setup in a component, and move wallet instantiation into useMemo(). Then import and use that context in _app.tsx like the others.

🤖 Prompt for AI Agents
In `@src/pages/_app.tsx` around lines 21 - 24, Create a dedicated
AleoWalletContext component (e.g.
src/features/wallet/context/AleoWalletContext.tsx) that wraps AleoWalletProvider
instead of importing/instantiating adapters in _app.tsx; move the
ShieldWalletAdapter creation into a useMemo() inside that context (mirroring
SolanaWalletContext) so adapters are only constructed on the client and not at
module load/SSR time, export the context component and replace the direct
provider usage in _app.tsx with <AleoWalletContext> so SSR-safe lazy
initialization is enforced for ShieldWalletAdapter and AleoWalletProvider.

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