Skip to content

✨ server: support directional pix endorsements - #1281

Open
mainqueg wants to merge 1 commit into
mainfrom
br
Open

✨ server: support directional pix endorsements#1281
mainqueg wants to merge 1 commit into
mainfrom
br

Conversation

@mainqueg

@mainqueg mainqueg commented Sep 1, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Added separate PIX support for onramp and offramp transactions in Brazil.
    • BRL availability now reflects the specific PIX transaction direction approved for an account.
    • Accounts with both PIX approvals can use BRL for both onramp and offramp flows.
  • Bug Fixes

    • Improved handling of unrecognized endorsements while preserving valid payment rails.
    • Updated Brazil onboarding to accurately record separate PIX permissions.

@changeset-bot

changeset-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a1146b6

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

This PR includes changesets to release 1 package
Name Type
@exactly/server 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

@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: 1c25072ff6

ℹ️ 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 server/utils/ramps/bridge.ts
Comment thread server/utils/ramps/bridge.ts
@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.36%. Comparing base (f76c1f1) to head (a1146b6).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
server/utils/ramps/bridge.ts 95.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1281      +/-   ##
==========================================
+ Coverage   72.51%   73.36%   +0.85%     
==========================================
  Files         275      276       +1     
  Lines       13254    13443     +189     
  Branches     4610     4705      +95     
==========================================
+ Hits         9611     9863     +252     
+ Misses       3306     3241      -65     
- Partials      337      339       +2     
Flag Coverage Δ
e2e 72.44% <70.00%> (-0.07%) ⬇️

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.

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

Next included review available in 9 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Team

Run ID: 0205eeb0-cf35-486e-8aea-959967147f18

📥 Commits

Reviewing files that changed from the base of the PR and between 1c25072 and a1146b6.

📒 Files selected for processing (1)
  • server/test/utils/bridge.test.ts

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Team

Run ID: 0a7205c1-60e0-4578-a235-b2bcd20167b8

📥 Commits

Reviewing files that changed from the base of the PR and between f76c1f1 and 1c25072.

📒 Files selected for processing (3)
  • .changeset/brave-otters-shake.md
  • server/test/utils/bridge.test.ts
  • server/utils/ramps/bridge.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

The server separates Brazil PIX endorsements into pix_offramp and pix_onramp. Ramp currency selection now respects direction. Unknown endorsements are captured and ignored. Tests cover provider responses and onboarding payloads.

Changes

Directional PIX support

Layer / File(s) Summary
Endorsement and currency contracts
server/utils/ramps/bridge.ts
The endorsement list includes directional PIX names. Currency mappings now include ramp direction. Unknown endorsement names are captured and filtered from parsed responses.
Directional ramp processing
server/utils/ramps/bridge.ts
Ramp account creation, deposit details, provider states, and Brazil onboarding use direction-specific currency filtering and PIX endorsements.
Behavior validation and release metadata
server/test/utils/bridge.test.ts, .changeset/brave-otters-shake.md
Tests cover directional currencies, duplicate prevention, unknown endorsements, and Brazil onboarding payloads. A patch changeset records the release.

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

Merge Risk: ⚪ Minimal · up to 1c250

The PR narrows PIX capabilities by ramp direction while retaining approved-endorsement checks and safely ignoring unknown provider names; no actionable merge-blocking risk remains at the current head after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant CustomerResponse
  participant getProvider
  participant fiat
  CustomerResponse->>getProvider: approved endorsement names
  getProvider->>fiat: request onramp currencies
  fiat-->>getProvider: direction-filtered currencies
  getProvider->>fiat: request offramp currencies
  fiat-->>getProvider: direction-filtered currencies
  getProvider-->>CustomerResponse: provider currencies by ramp
Loading

Suggested reviewers: cruzdanilo, nfmelendez

🚥 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 clearly and concisely summarizes the main change: support for directional PIX endorsements in the server.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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 br
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch br

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.

@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: f23b8164bd

ℹ️ 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 server/test/utils/bridge.test.ts Outdated
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