Skip to content

feat(networks): Scroll and Celo support, token API alignment, and SEO updates#446

Merged
onahprosper merged 2 commits intomainfrom
feat/scroll-celo-and-token-alignment
Apr 8, 2026
Merged

feat(networks): Scroll and Celo support, token API alignment, and SEO updates#446
onahprosper merged 2 commits intomainfrom
feat/scroll-celo-and-token-alignment

Conversation

@chibie
Copy link
Copy Markdown
Contributor

@chibie chibie commented Apr 8, 2026

Description

This pull request enables Scroll and Celo across Privy, the in-app network list, balance fetching, and the server bundler (SUPPORTED_CHAINS with networkName for RPC resolution via getRpcUrl, including Scroll). Celo is no longer hidden for embedded/smart-wallet users so network pickers and cross-chain balances match injected-wallet behavior. Redundant client-side token merges for Base USDT and Lisk cNGN were removed because the Paycrest tokens API already returns them.

Fallback token data and Scroll RPC configuration were updated (Dwellir Scroll host without -archive). cNGN entries in FALLBACK_TOKENS use the display name Compliant Naira while keeping symbol cNGN. SEO and LLM-oriented copy (layout, blog metadata, llms.txt) were aligned with actually supported assets and networks (no DAI/Optimism claims; Scroll listed). The diff also includes small updates to the release workflow, migration modals/banner, and TransactionPreview that were part of the staged set.

References

closes #447

Testing

  • Manually switch networks in the app (embedded and injected where applicable) and confirm tokens load from the API and balances refresh.

  • Smoke the bundler-related flows that pass chainId for supported chains, including Scroll if applicable.

  • Rely on GitHub CI after push for automated checks.

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation and tests for new/changed functionality in this PR
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not main

By submitting a PR, I agree to Paycrest's Contributor Code of Conduct and Contribution Guide.

Summary by CodeRabbit

  • New Features

    • Added Scroll network support for transfers and balances
  • Improvements

    • Celo is now shown for all wallet types in network selectors
    • Supported stablecoins updated to USDC, USDT, and cNGN (DAI removed)
    • App wording and SEO/metadata refined (e.g., “onchain” terminology)
    • Malawian Kwacha (MWK) currency enabled in currency lists

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 53369217-329a-450e-9038-10336cf86202

📥 Commits

Reviewing files that changed from the base of the PR and between 9ddbb7c and 36ed0fc.

📒 Files selected for processing (2)
  • app/mocks.ts
  • app/pages/TransactionForm.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/mocks.ts

📝 Walkthrough

Walkthrough

Removed wallet-type-based network filtering across UI and balance logic, added Scroll and Celo support (configs, RPC, mocks), updated token fallback data and removed Base USDT injection, replaced DAI with cNGN in SEO/content, and standardized “on-chain” → “onchain” wording.

Changes

Cohort / File(s) Summary
Network Filtering Removal
app/components/CopyAddressWarningModal.tsx, app/components/FundWalletForm.tsx, app/components/NetworkSelectionModal.tsx, app/components/NetworksDropdown.tsx, app/components/TransferForm.tsx, app/components/wallet-mobile-modal/WalletView.tsx, app/context/BalanceContext.tsx
Removed URL- and injected-wallet-based filtering; components and BalanceProvider now always use the full networks list (Celo included).
Stablecoin & SEO Updates (DAI → cNGN)
app/blog/layout.tsx, app/blog/page.tsx, app/layout.tsx, llms.txt
Replaced DAI references with cNGN in metadata, JSON‑LD, and docs; updated keywords and supportedStablecoins lists.
Scroll & Celo Network Support
app/lib/bundler/chains.ts, app/lib/privy-config.ts, app/mocks.ts, app/utils.ts
Added scroll (and celo) imports and configuration: SUPPORTED_CHAINS mapping, Privy RPC overrides, network mock entry, and Scroll Dwellir RPC URL handling.
Token and Fallback Data Updates
app/context/TokensContext.tsx, app/utils.ts
Removed hardcoded USDT injection into tokens["Base"]; renamed cNGN display name to "Compliant Naira" in FALLBACK_TOKENS and added fallback tokens for Scroll, Celo, and Lisk.
Text Standardization
app/components/MigrationZeroBalanceModal.tsx, app/components/WalletMigrationBanner.tsx, app/components/WalletMigrationModal.tsx, app/pages/TransactionPreview.tsx
Unified user-facing copy by changing “on-chain” → “onchain” in multiple components and error messages.
Release Workflow
.github/workflows/create-release.yml
Refined release classification regexes and grep handling for major/minor/breaking detection in the release workflow.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • 5ran6
  • onahprosper

Poem

🐰 I hopped from DAI to cNGN with glee,
Celo and Scroll now join the spree.
No filters hide networks from view,
Onchain we travel—fresh and new.
Tokens aligned, the garden grows free.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The PR title accurately and concisely summarizes the main changes: adding Scroll and Celo support, aligning token data with the API, and updating SEO metadata.
Description check ✅ Passed The PR description is comprehensive and follows the template structure with clear Description, References, Testing, and Checklist sections covering all key changes.
Linked Issues check ✅ Passed All acceptance criteria from issue #447 are met: Scroll and Celo are exposed in network selectors, token lists rely on API without redundant merges, public copy updated to remove DAI/Optimism and reflect Scroll, and Privy/bundler configurations include both networks.
Out of Scope Changes check ✅ Passed Minor out-of-scope changes detected: release workflow grep pattern refinements, on-chain/onchain wording updates, and MWK currency enabling are tangential to core objectives but reasonably part of the staged changeset.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/scroll-celo-and-token-alignment

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.

@paycrest-dev paycrest-dev marked this pull request as ready for review April 8, 2026 12:43
Copy link
Copy Markdown
Contributor

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
app/utils.ts (1)

163-177: ⚠️ Potential issue | 🟠 Major

Fail fast when RPC key is missing

Line 164 reads NEXT_PUBLIC_RPC_URL_KEY, but Line 167–181 build URLs with ${rpcUrlKey ?? ""}. That always returns a string, so callers can’t detect misconfiguration and public fallbacks won’t trigger (downstream impact in app/lib/privy-config.ts for Celo/Scroll).

Suggested fix
 export function getRpcUrl(network: string) {
-  const rpcUrlKey = process.env.NEXT_PUBLIC_RPC_URL_KEY;
+  const rpcUrlKey = process.env.NEXT_PUBLIC_RPC_URL_KEY?.trim();
+  if (!rpcUrlKey) {
+    return undefined;
+  }
   switch (network) {
     case "Polygon":
-      return `https://api-polygon-mainnet-full.n.dwellir.com/${rpcUrlKey ?? ""}`;
+      return `https://api-polygon-mainnet-full.n.dwellir.com/${rpcUrlKey}`;
     case "BNB Smart Chain":
-      return `https://api-bsc-mainnet-full.n.dwellir.com/${rpcUrlKey ?? ""}`;
+      return `https://api-bsc-mainnet-full.n.dwellir.com/${rpcUrlKey}`;
     case "Base":
-      return `https://api-base-mainnet-archive.n.dwellir.com/${rpcUrlKey ?? ""}`;
+      return `https://api-base-mainnet-archive.n.dwellir.com/${rpcUrlKey}`;
     case "Arbitrum One":
-      return `https://api-arbitrum-mainnet-archive.n.dwellir.com/${rpcUrlKey ?? ""}`;
+      return `https://api-arbitrum-mainnet-archive.n.dwellir.com/${rpcUrlKey}`;
     case "Celo":
-      return `https://api-celo-mainnet-archive.n.dwellir.com/${rpcUrlKey ?? ""}`;
+      return `https://api-celo-mainnet-archive.n.dwellir.com/${rpcUrlKey}`;
     case "Scroll":
-      return `https://api-scroll-mainnet.n.dwellir.com/${rpcUrlKey ?? ""}`;
+      return `https://api-scroll-mainnet.n.dwellir.com/${rpcUrlKey}`;
     case "Lisk":
-      return `https://api-lisk-mainnet.n.dwellir.com/${rpcUrlKey ?? ""}`;
+      return `https://api-lisk-mainnet.n.dwellir.com/${rpcUrlKey}`;
     case "Ethereum":
-      return `https://api-ethereum-mainnet.n.dwellir.com/${rpcUrlKey ?? ""}`;
+      return `https://api-ethereum-mainnet.n.dwellir.com/${rpcUrlKey}`;
     default:
       return undefined;
   }
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/utils.ts` around lines 163 - 177, getRpcUrl currently masks a missing
NEXT_PUBLIC_RPC_URL_KEY by substituting an empty string, preventing callers from
detecting misconfiguration; change getRpcUrl to read
process.env.NEXT_PUBLIC_RPC_URL_KEY into rpcUrlKey, immediately throw a clear
Error (including the env var name) if rpcUrlKey is null/undefined, and remove
the `${rpcUrlKey ?? ""}` fallbacks in each switch case so the templates use
rpcUrlKey directly; this makes misconfiguration fail fast and lets callers (like
privy-config) react appropriately.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@app/utils.ts`:
- Around line 163-177: getRpcUrl currently masks a missing
NEXT_PUBLIC_RPC_URL_KEY by substituting an empty string, preventing callers from
detecting misconfiguration; change getRpcUrl to read
process.env.NEXT_PUBLIC_RPC_URL_KEY into rpcUrlKey, immediately throw a clear
Error (including the env var name) if rpcUrlKey is null/undefined, and remove
the `${rpcUrlKey ?? ""}` fallbacks in each switch case so the templates use
rpcUrlKey directly; this makes misconfiguration fail fast and lets callers (like
privy-config) react appropriately.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2aaf5547-7298-4a02-90f2-b707acf1dcf7

📥 Commits

Reviewing files that changed from the base of the PR and between 488e5a0 and 9ddbb7c.

📒 Files selected for processing (21)
  • .github/workflows/create-release.yml
  • app/blog/layout.tsx
  • app/blog/page.tsx
  • app/components/CopyAddressWarningModal.tsx
  • app/components/FundWalletForm.tsx
  • app/components/MigrationZeroBalanceModal.tsx
  • app/components/NetworkSelectionModal.tsx
  • app/components/NetworksDropdown.tsx
  • app/components/TransferForm.tsx
  • app/components/WalletMigrationBanner.tsx
  • app/components/WalletMigrationModal.tsx
  • app/components/wallet-mobile-modal/WalletView.tsx
  • app/context/BalanceContext.tsx
  • app/context/TokensContext.tsx
  • app/layout.tsx
  • app/lib/bundler/chains.ts
  • app/lib/privy-config.ts
  • app/mocks.ts
  • app/pages/TransactionPreview.tsx
  • app/utils.ts
  • llms.txt
💤 Files with no reviewable changes (1)
  • app/context/TokensContext.tsx

@onahprosper onahprosper merged commit 12947e2 into main Apr 8, 2026
1 check passed
@onahprosper onahprosper deleted the feat/scroll-celo-and-token-alignment branch April 8, 2026 14:05
onahprosper added a commit that referenced this pull request Apr 8, 2026
* fix: update migration modal visibility logic

* refactor: enhance SUPPORTED_CHAINS structure and improve RPC URL handling

* Updated the SUPPORTED_CHAINS object to include network names for better clarity.
* Refactored the parseRpcUrl function to utilize the new networkName property for retrieving RPC URLs, improving error handling for unsupported chains.

* feat(settings): add theme switch to desktop dropdown

Add the existing theme switch to the desktop settings dropdown so users can change theme without relying on the footer. The new section keeps the footer control as a secondary entry point and aligns the dropdown styling with the existing menu items.

* refactor: build time enhancements (#414)

* refactor: build time enhancements

* refactor: optimize JWT verification and enhance user ID fetching with timeout handling

* fixes

* feat: add audience parameter to JWT verification for enhanced security

* change variable

---------

Co-authored-by: chibie <chibuotu@gmail.com>
Co-authored-by: Prosper <40717516+onahprosper@users.noreply.github.com>

* chore: update pnpm-lock.yaml to restore cypress dependency and adjust package versions

* Reintroduced cypress dependency with version 15.7.1.
* Minor adjustments to package versions and dependencies for consistency.

* Merge pull request #432 from jeremy0x/main

feat: default balance view to highest-value network after login

* refactor: enhance error handling across components (#426)

* refactor: enhance error handling across components

* fix: improve error handling in TransactionPreview component

* fix

* refactor: remove liquidity error handling from errorMessages and TransactionForm

* fix: enhance error handling for network switching in MobileDropdown and NetworksDropdown components

* feat: integrate Sentry for client error reporting

---------

Co-authored-by: Prosper <40717516+onahprosper@users.noreply.github.com>

* fix: users can use external wallet as main wallet through privy (#428)

* fix: users can use external wallet as main wallet through privy

* fixes

---------

Co-authored-by: Prosper <40717516+onahprosper@users.noreply.github.com>

* feat(networks): Scroll and Celo support, token API alignment, and SEO updates (#446)

* feat(networks): add Scroll and Celo, align tokens and docs

* feat(currency): enable MWK receive currency

---------

Co-authored-by: Isaac Onyemaechi <amaechiisaac450@gmail.com>
Co-authored-by: jeremy0x <aworetanjeremiah@gmail.com>
Co-authored-by: chibie <chibuotu@gmail.com>
Co-authored-by: Francis Ocholi <5raan6@gmail.com>
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.

feat(noblocks): Scroll and Celo support, token API alignment, and SEO updates

2 participants