🔒️ server: restrict bridge access by country - #1066
Conversation
🦋 Changeset detectedLatest commit: 1a88c70 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
WalkthroughThis PR restricts bridge provider access for denylisted countries. It adds an ChangesBridge country denylisting
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces a mechanism to restrict bridge access by country, specifically denylisting Indonesia ("ID"). It updates the ramp API to return a 400 status code when a country is denylisted, handles this in the onboarding process, and adds corresponding unit tests. The review feedback suggests defensively normalizing the country code to uppercase before checking the denylist in both getProvider and onboarding functions to prevent potential case-sensitivity bypasses.
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: f16b75c3-5d35-4e0e-87fa-75b62e268d12
📒 Files selected for processing (5)
.changeset/wary-falcon-guard.mdserver/api/ramp.tsserver/test/api/ramp.test.tsserver/test/utils/bridge.test.tsserver/utils/ramps/bridge.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1a88c70669
ℹ️ 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".
Summary by CodeRabbit
New Features
Tests