Skip to content

feat(grid-wallet-prod): payouts reach every corridor; only funding is rail-limited - #744

Open
pengying wants to merge 1 commit into
mainfrom
07-25-feat_grid-wallet-prod_payouts_reach_every_corridor_only_funding_is_rail-limited
Open

feat(grid-wallet-prod): payouts reach every corridor; only funding is rail-limited#744
pengying wants to merge 1 commit into
mainfrom
07-25-feat_grid-wallet-prod_payouts_reach_every_corridor_only_funding_is_rail-limited

Conversation

@pengying

Copy link
Copy Markdown
Contributor

The US + euro-area restriction was applied to the whole bank picker, which also
narrowed withdraw and send. That conflated two different questions: money can only
ARRIVE over the rails this wallet settles (ACH/wire/RTP for USD, SEPA for EUR), but
it can be PAID OUT to any corridor Grid supports.

  • BANK_COUNTRIES is the full 55-country list again (restored from before the trim,
    with its recipient names and bank pools; validated against the spec schemas).
  • Add money filters to FUNDING_ACCOUNT_TYPES; withdraw, send and receive get the
    whole list.
  • Each direction has its own "popular" order: popularRank follows payment volume
    for payouts, fundingRank orders the corridors we can be funded over.
  • Corridor copy follows the direction too — the shared bank source row, and the
    empty-state text, no longer claim US/euro-area limits in the payout flows.

Verified in the browser: Add offers the funding pool (US, Germany, France, Spain,
Italy, Netherlands popular; no Mexico/India), Withdraw offers Mexico, India,
Nigeria, the UK, Brazil, Kenya and the rest.

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01Pjqydq34z8DBK1kBrioXK2

@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown

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

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
grid-flow-builder Ignored Ignored Preview Jul 27, 2026 10:01pm
grid-wallet-demo Ignored Ignored Preview Jul 27, 2026 10:01pm

Request Review

@greptile-apps

greptile-apps Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR separates inbound funding corridors from outbound payout corridors.

  • Restores the broader bank-country catalog and payout-oriented popularity ranks.
  • Restricts Add Money using funding account types and funding-specific ranks.
  • Updates bank-source and empty-state copy according to the active direction.

Confidence Score: 3/5

The PR should not merge until Add Money uses explicit funding-corridor eligibility rather than the broader account schema type.

The new filter admits non-euro-area EUR_ACCOUNT countries into a flow whose changed copy and stated contract restrict incoming bank funding to the US and euro area.

Files Needing Attention: components/grid-wallet-prod/src/apps/shared/wallet/useMoneySheet.ts and components/grid-wallet-prod/src/data/bankCountries.ts

Important Files Changed

Filename Overview
components/grid-wallet-prod/src/apps/shared/wallet/useMoneySheet.ts Introduces mode-specific pools and ranks, but the funding filter conflates EUR account schemas with euro-area eligibility.
components/grid-wallet-prod/src/data/bankCountries.ts Restores the broader corridor catalog and separate ranking metadata; its non-euro EUR_ACCOUNT entries expose the funding-filter mismatch.
components/grid-wallet-prod/src/apps/aurora/wallet/AddMoneySheet.tsx Updates direction-specific bank and empty-state copy, though the euro-area funding claim does not match the resulting picker.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    M{Money-sheet mode} -->|Add Money| F[Filter by FUNDING_ACCOUNT_TYPES]
    M -->|Withdraw / Send / Receive| A[Use all BANK_COUNTRIES]
    F --> FP[Funding-ranked country picker]
    A --> PP[Payout-ranked country picker]
    FP --> D[Funding details / bank form]
    PP --> B[Bank form or receive details]
Loading
Prompt To Fix All With AI
### Issue 1
components/grid-wallet-prod/src/apps/shared/wallet/useMoneySheet.ts:190-193
**Funding filter conflates account eligibility**

When Add Money is opened, filtering by `accountType` admits non-euro-area `EUR_ACCOUNT` countries such as Denmark, Norway, Sweden, and Switzerland, allowing users to proceed with countries outside the funding corridor advertised by this flow.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "feat(grid-wallet-prod): payouts reach ev..." | Re-trigger Greptile

Comment on lines +190 to +193
const funding = mode === 'add';
const countryPool = funding
? BANK_COUNTRIES.filter((c) => FUNDING_ACCOUNT_TYPES.includes(c.accountType))
: BANK_COUNTRIES;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Funding filter conflates account eligibility

When Add Money is opened, filtering by accountType admits non-euro-area EUR_ACCOUNT countries such as Denmark, Norway, Sweden, and Switzerland, allowing users to proceed with countries outside the funding corridor advertised by this flow.

Prompt To Fix With AI
This is a comment left during a code review.
Path: components/grid-wallet-prod/src/apps/shared/wallet/useMoneySheet.ts
Line: 190-193

Comment:
**Funding filter conflates account eligibility**

When Add Money is opened, filtering by `accountType` admits non-euro-area `EUR_ACCOUNT` countries such as Denmark, Norway, Sweden, and Switzerland, allowing users to proceed with countries outside the funding corridor advertised by this flow.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

@pengying
pengying force-pushed the 07-24-fix_grid-wallet-prod_replay_missed_webhooks_to_reconnecting_sse_clients branch from 2d9f615 to 6b5ade0 Compare July 27, 2026 21:17
@pengying
pengying force-pushed the 07-25-feat_grid-wallet-prod_payouts_reach_every_corridor_only_funding_is_rail-limited branch from 026bd43 to 742d8cc Compare July 27, 2026 21:17
@pengying
pengying force-pushed the 07-24-fix_grid-wallet-prod_replay_missed_webhooks_to_reconnecting_sse_clients branch from 6b5ade0 to 7172ecc Compare July 27, 2026 21:41
@pengying
pengying force-pushed the 07-25-feat_grid-wallet-prod_payouts_reach_every_corridor_only_funding_is_rail-limited branch from 742d8cc to 8eb60b9 Compare July 27, 2026 21:41
@pengying
pengying force-pushed the 07-24-fix_grid-wallet-prod_replay_missed_webhooks_to_reconnecting_sse_clients branch from 7172ecc to 63fb4ad Compare July 27, 2026 21:57
@pengying
pengying force-pushed the 07-25-feat_grid-wallet-prod_payouts_reach_every_corridor_only_funding_is_rail-limited branch from 8eb60b9 to b895952 Compare July 27, 2026 21:57
mariano-macri
mariano-macri previously approved these changes Jul 27, 2026

pengying commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Jul 27, 10:01 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jul 27, 10:02 PM UTC: Graphite rebased this pull request as part of a merge.
  • Jul 27, 10:02 PM UTC: Graphite couldn't merge this PR because it failed for an unknown reason (New changes require approval from someone other than the last pusher).

@pengying
pengying changed the base branch from 07-24-fix_grid-wallet-prod_replay_missed_webhooks_to_reconnecting_sse_clients to graphite-base/744 July 27, 2026 22:01
@pengying
pengying changed the base branch from graphite-base/744 to main July 27, 2026 22:01
@pengying
pengying dismissed mariano-macri’s stale review July 27, 2026 22:01

The base branch was changed.

… rail-limited

The US + euro-area restriction was applied to the whole bank picker, which also
narrowed withdraw and send. That conflated two different questions: money can only
ARRIVE over the rails this wallet settles (ACH/wire/RTP for USD, SEPA for EUR), but
it can be PAID OUT to any corridor Grid supports.

- BANK_COUNTRIES is the full 55-country list again (restored from before the trim,
  with its recipient names and bank pools; validated against the spec schemas).
- Add money filters to FUNDING_ACCOUNT_TYPES; withdraw, send and receive get the
  whole list.
- Each direction has its own "popular" order: `popularRank` follows payment volume
  for payouts, `fundingRank` orders the corridors we can be funded over.
- Corridor copy follows the direction too — the shared bank source row, and the
  empty-state text, no longer claim US/euro-area limits in the payout flows.

Verified in the browser: Add offers the funding pool (US, Germany, France, Spain,
Italy, Netherlands popular; no Mexico/India), Withdraw offers Mexico, India,
Nigeria, the UK, Brazil, Kenya and the rest.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pjqydq34z8DBK1kBrioXK2
@pengying
pengying force-pushed the 07-25-feat_grid-wallet-prod_payouts_reach_every_corridor_only_funding_is_rail-limited branch from b895952 to 48e26ef Compare July 27, 2026 22:01
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.

2 participants