Conversation
🦋 Changeset detectedLatest commit: a52283e 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 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (6)
WalkthroughAdds EVM (BASE) support to the bridge onramp: introduces an EVM network enum and evm payment rail, extends /quote request/response schemas to accept EVM networks and include EVM deposit addresses, threads evmNetwork through deposit lookup/creation, updates liquidation handling, adds tests, and a changeset. Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Client
participant API as API (/quote)
participant Bridge as Bridge utils
participant DB as DB / Liquidation store
Client->>API: GET /quote?provider=bridge¤cy=USDC&network=BASE
API->>Bridge: resolve provider & request deposit details (evmNetwork=BASE)
Bridge->>DB: lookup liquidation address (chain="evm", network=BASE)
alt liquidation exists
DB-->>Bridge: return liquidation address (Address)
Bridge-->>API: return depositInfo { displayName, address, fee, estimatedProcessingTime }
API-->>Client: 200 { depositInfo }
else none found
Bridge->>DB: create liquidation address for evm (network=BASE)
DB-->>Bridge: new liquidation address
Bridge-->>API: return depositInfo (with new address)
API-->>Client: 200 { depositInfo }
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 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)
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 support for EVM networks, specifically the BASE network, for the Bridge onramp provider. Key changes include updating API validators and schemas to support the new network, extending bridge utilities to handle EVM liquidation addresses, and adding relevant test cases. I have no feedback to provide.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #951 +/- ##
==========================================
+ Coverage 72.02% 72.38% +0.35%
==========================================
Files 229 229
Lines 8358 8488 +130
Branches 2692 2750 +58
==========================================
+ Hits 6020 6144 +124
Misses 2106 2106
- Partials 232 238 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
server/utils/ramps/bridge.ts (1)
855-869: 🧹 Nitpick | 🔵 TrivialRedundant
"evm"in picklist.
CryptoPaymentRail(line 510) already includes"evm", so spreading it and appending"evm"again creates a duplicate. The schemas work correctly, but the duplication is misleading.🔧 Proposed fix
const CreateLiquidationAddress = object({ currency: picklist(["usdc", "usdt"]), - chain: picklist([...CryptoPaymentRail, "evm"]), + chain: picklist(CryptoPaymentRail), destination_payment_rail: picklist(BridgeChain), destination_currency: picklist(["usdc"]), destination_address: Address, }); const LiquidationAddress = object({ id: string(), currency: picklist(["usdc", "usdt", "any"]), - chain: picklist([...CryptoPaymentRail, "evm"]), + chain: picklist(CryptoPaymentRail), address: string(), destination_address: string(), });
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 941559ec-be2b-4d00-b1d6-ae3ef62fbebe
📒 Files selected for processing (5)
.changeset/bright-evm-arrive.mdserver/api/ramp.tsserver/test/api/ramp.test.tsserver/test/utils/bridge.test.tsserver/utils/ramps/bridge.ts
1b06371 to
c4899b8
Compare
Summary by CodeRabbit