Skip to content

🦺 server: send travel rule data when creating virtual accounts - #1109

Merged
cruzdanilo merged 1 commit into
mainfrom
travel
Jun 24, 2026
Merged

🦺 server: send travel rule data when creating virtual accounts#1109
cruzdanilo merged 1 commit into
mainfrom
travel

Conversation

@mainqueg

@mainqueg mainqueg commented Jun 23, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Virtual account creation now includes travel rule data containing beneficiary information, including wallet custody designation and account attestation timestamp.
  • Tests

    • Enhanced test coverage to validate travel rule data structure and ensure all required beneficiary fields, including custody type and verification timestamp, are correctly included in virtual account requests.

@changeset-bot

changeset-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8cfb810

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

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@mainqueg, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 57 minutes and 46 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

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

🚦 How do rate 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 see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 819c7db2-2e46-451c-bac7-9be84002eb7e

📥 Commits

Reviewing files that changed from the base of the PR and between 755132d and 8cfb810.

📒 Files selected for processing (3)
  • .changeset/lucky-falcons-attest.md
  • server/test/utils/bridge.test.ts
  • server/utils/ramps/bridge.ts

Walkthrough

The change extends the Bridge virtual account creation flow to include a travel_rule_data payload. The request body gains a beneficiary object marking the user as a self-custodied self-beneficiary with a dynamically generated ISO attestation timestamp. The valibot schema is updated to validate the new structure, and the existing test is strengthened to assert the full POST body.

Changes

Travel Rule Data for Virtual Accounts

Layer / File(s) Summary
Schema extension and request payload
server/utils/ramps/bridge.ts
CreateVirtualAccount valibot schema adds a travel_rule_data object with beneficiary.is_self, beneficiary.wallet_type (constrained to a fixed picklist including self_custodied), and beneficiary.wallet_attested_ownership_at. getDepositDetails populates this field with is_self: true, wallet_type: self_custodied, and a new Date().toISOString() timestamp.
Test assertions and changeset
server/test/utils/bridge.test.ts, .changeset/lucky-falcons-attest.md
The "creates virtual account when none exists" test now captures the creation fetch call and asserts the POST URL contains /virtual_accounts and the JSON body includes the full travel_rule_data.beneficiary structure with an ISO datetime pattern match. A patch changeset entry records the behavioral change for @exactly/server.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • exactly/exa#1025: Modifies the same CreateVirtualAccount request shape in server/utils/ramps/bridge.ts and server/test/utils/bridge.test.ts, changing the source_deposit_instructions payload structure in the same virtual account creation flow.

Suggested reviewers

  • nfmelendez
  • cruzdanilo
🚥 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 describes the main change: adding travel rule data to virtual account creation requests, which is reflected across all modified files.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch travel
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch travel

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 the inclusion of travel rule data when creating virtual accounts in the Bridge utility, updating both the implementation and the corresponding tests. The reviewer suggested making the travel_rule_data field optional in the CreateVirtualAccount schema to align with the Bridge API and prevent potential validation errors.

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 server/utils/ramps/bridge.ts

@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: 755132dfed

ℹ️ 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

@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: 410f8438-950a-4ebc-9e08-2d9e33fdaa82

📥 Commits

Reviewing files that changed from the base of the PR and between c9160e0 and 755132d.

📒 Files selected for processing (3)
  • .changeset/lucky-falcons-attest.md
  • server/test/utils/bridge.test.ts
  • server/utils/ramps/bridge.ts

Comment thread server/test/utils/bridge.test.ts
@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.70%. Comparing base (1347bab) to head (8cfb810).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1109      +/-   ##
==========================================
+ Coverage   75.55%   75.70%   +0.15%     
==========================================
  Files         245      245              
  Lines       11842    11917      +75     
  Branches     4170     4197      +27     
==========================================
+ Hits         8947     9022      +75     
+ Misses       2574     2572       -2     
- Partials      321      323       +2     
Flag Coverage Δ
e2e 75.40% <100.00%> (+1.18%) ⬆️

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.

@cruzdanilo
cruzdanilo merged commit 8cfb810 into main Jun 24, 2026
13 of 14 checks passed
@cruzdanilo
cruzdanilo deleted the travel branch June 24, 2026 13:51
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