Skip to content

✨ app: surface funding banner#1149

Open
dieguezguille wants to merge 2 commits into
mainfrom
funding
Open

✨ app: surface funding banner#1149
dieguezguille wants to merge 2 commits into
mainfrom
funding

Conversation

@dieguezguille

@dieguezguille dieguezguille commented Jul 13, 2026

Copy link
Copy Markdown
Member

closes #1133

Summary by CodeRabbit

  • New Features
    • Added a Funding alert/banner on the Home and Card experiences to guide eligible next steps, with direct actions for swapping or adding funds.
  • Improvements
    • Updated card reveal/activation and “awaiting activation” messaging to rely on on-chain bytecode availability and KYC approval.
    • Extended pull-to-refresh to also re-check bytecode status.
    • Adjusted swap state freshness so the default swap data is treated as always current.
  • Localization
    • Added/expanded Spanish (ES-AR/ES) and Portuguese translations for funding and swap-related prompts.

@changeset-bot

changeset-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9352f77

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@exactly/mobile Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@dieguezguille, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: b25a4da3-3a0f-4dcf-88be-0255e45a3737

📥 Commits

Reviewing files that changed from the base of the PR and between 514322d and 9352f77.

📒 Files selected for processing (10)
  • .changeset/odd-clubs-carry.md
  • .changeset/witty-crabs-arrive.md
  • cspell.json
  • src/components/card/Card.tsx
  • src/components/home/Home.tsx
  • src/components/shared/FundingAlert.tsx
  • src/components/swaps/Swaps.tsx
  • src/i18n/es-AR.json
  • src/i18n/es.json
  • src/i18n/pt.json

Walkthrough

Card activation now uses account bytecode checks, while a shared funding banner guides users to add funds or swap supported assets. The banner is rendered on home and card screens, with new translations, swap preset access, spell-check entries, and mobile patch changesets.

Changes

Funding and card activation flow

Layer / File(s) Summary
Bytecode-based card activation readiness
src/components/card/Card.tsx
Card refresh, reveal redirects, and awaiting-activation rendering now use account bytecode with card details and KYC state.
Funding alert and swap action
src/components/shared/FundingAlert.tsx, src/components/swaps/Swaps.tsx
FundingAlert gates on account state, offers add-funds or swap actions, and prepares swap data using the exported defaultSwap.
Screen wiring, translations, and release metadata
src/components/card/Card.tsx, src/components/home/Home.tsx, src/i18n/*.json, cspell.json, .changeset/*.md
The alert is added to home and card screens, localized strings and spell-check entries are added, and two mobile patch changesets document the updates.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant FundingAlert
  participant Portfolio
  participant ReactQuery
  participant Router
  User->>FundingAlert: view home or card screen
  FundingAlert->>Portfolio: read portfolio and external assets
  FundingAlert->>ReactQuery: query KYC status and account bytecode
  alt swappable assets exist
    User->>FundingAlert: select swap action
    FundingAlert->>ReactQuery: seed swap preset data
    ReactQuery-->>FundingAlert: return swap data
    FundingAlert->>Router: navigate to /swaps
  else no swappable assets
    User->>FundingAlert: select add-funds action
    FundingAlert->>Router: navigate to /add-funds
  end
Loading

Suggested reviewers: cruzdanilo, franm91

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and clearly summarizes the main change: surfacing a funding banner in the app.
Linked Issues check ✅ Passed The PR adds a home-screen funding banner that explains swapping into collateral assets, and the activation flow remains usable for affected users.
Out of Scope Changes check ✅ Passed The extra changes are supporting updates for the banner flow, including translations, spellcheck entries, changesets, and swap cache export.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch funding
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch funding

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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new FundingAlert component to display a funding banner on the home and card screens, and updates the card activation logic to allow activation without deposits by checking for bytecode instead of a USD balance. The review feedback highlights two key improvements: first, refining the banner visibility check to account for supported assets already in the user's wallet (not just deposited in the protocol) to prevent incorrect 'Add funds' prompts; second, ensuring the swap mutation throws an error on missing preconditions and only redirects to the swaps screen upon a successful mutation.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/components/shared/FundingAlert.tsx
Comment thread src/components/shared/FundingAlert.tsx

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c483001f-4f79-4241-a657-d6cadeec10ae

📥 Commits

Reviewing files that changed from the base of the PR and between f0f3659 and 808508a.

📒 Files selected for processing (9)
  • .changeset/odd-clubs-carry.md
  • .changeset/witty-crabs-arrive.md
  • src/components/card/Card.tsx
  • src/components/home/Home.tsx
  • src/components/shared/FundingAlert.tsx
  • src/components/swaps/Swaps.tsx
  • src/i18n/es-AR.json
  • src/i18n/es.json
  • src/i18n/pt.json

Comment thread src/components/card/Card.tsx Outdated
Comment thread src/components/shared/FundingAlert.tsx
Comment thread src/components/shared/FundingAlert.tsx Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 808508a60f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/components/shared/FundingAlert.tsx
Comment thread src/components/shared/FundingAlert.tsx
Comment thread src/components/shared/FundingAlert.tsx
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 41.50943% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.65%. Comparing base (76a9dc4) to head (9352f77).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/components/shared/FundingAlert.tsx 38.46% 24 Missing ⚠️
src/components/card/Card.tsx 50.00% 6 Missing ⚠️
src/components/swaps/Swaps.tsx 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1149      +/-   ##
==========================================
- Coverage   73.27%   70.65%   -2.62%     
==========================================
  Files         254      262       +8     
  Lines       10839    11267     +428     
  Branches     3598     3779     +181     
==========================================
+ Hits         7942     7961      +19     
- Misses       2613     3022     +409     
  Partials      284      284              
Flag Coverage Δ
e2e 70.02% <41.50%> (-3.22%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dieguezguille
dieguezguille force-pushed the funding branch 2 times, most recently from a45bff6 to 7ecc3d2 Compare July 16, 2026 13:17

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7ecc3d2403

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/components/card/Card.tsx Outdated
Comment thread src/components/shared/FundingAlert.tsx Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3f7e69e7-bd01-4c2e-9487-162cc7e8f07f

📥 Commits

Reviewing files that changed from the base of the PR and between 3f63c59 and 33d547f.

📒 Files selected for processing (10)
  • .changeset/odd-clubs-carry.md
  • .changeset/witty-crabs-arrive.md
  • cspell.json
  • src/components/card/Card.tsx
  • src/components/home/Home.tsx
  • src/components/shared/FundingAlert.tsx
  • src/components/swaps/Swaps.tsx
  • src/i18n/es-AR.json
  • src/i18n/es.json
  • src/i18n/pt.json

Comment thread src/components/shared/FundingAlert.tsx

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 33d547fba4

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +85 to +89
const [bridgeable] = [...crossChainAssets].sort((a, b) => b.usdValue - a.usdValue);
if (bridgeable) {
router.push({
pathname: "/(main)/add-funds/bridge",
params: { sender: "exa", sourceChain: String(bridgeable.chainId), sourceToken: bridgeable.address },

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Filter unsupported cross-chain sources before bridging

When the only cross-chain balance is on a chain that the existing external-assets flow treats as unsupported (not in alchemyChainById, or the Exa account is undeployed on that chain), this branch can still select it and push directly into the Exa-sender bridge route. I checked ExternalAssets.tsx, which gates the same bridge route with isUnsupported(...) and shows the unsupported-network sheet instead, so this banner bypasses that guard and can send users to a bridge flow their account cannot execute.

Useful? React with 👍 / 👎.

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.

ui: non-dismisable banner for users holding non-collateral assets

1 participant