-
Notifications
You must be signed in to change notification settings - Fork 18
feat(bank): add Relio Payment Platform API integration #2952
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
TaprootFreak
wants to merge
10
commits into
develop
Choose a base branch
from
feature/relio-bank-integration
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+972
−2
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add new bank integration for Relio AG (Swiss fintech bank) with support for: - Ed25519 request signing authentication - Account and wallet management - Payment order creation - Foreign exchange quotes and execution New files: - relio.service.ts: Main service with Ed25519 signing - relio.dto.ts: TypeScript interfaces for Relio API Configuration via environment variables: - RELIO_BASE_URL - RELIO_API_KEY - RELIO_PRIVATE_KEY - RELIO_ORGANIZATION_ID
|
- Change body sorting from recursive to top-level only
- Add query parameter sorting (alphabetical)
- Fix empty object handling (now produces '{}' instead of '')
- Add detailed comments explaining canonical string format
- Use originalUrl (path + query AS-IS) instead of separate params - Sort only top-level body keys (not recursive) - Remove query param sorting (not in NodeJS example)
- Empty object {} returns '' (not '{}') matching NodeJS example
- Arrays are stringified as-is without sorting
- Added complete NodeJS example code in documentation
BREAKING FIX: Empty object {} now returns '{}' not ''
The previous implementation incorrectly assumed the NodeJS example
had a check for Object.keys(request.body).length > 0, but reviewing
the actual code on page 4 of the documentation shows:
- if (request.body) is a truthy check, not a length check
- Empty object {} is truthy, so it enters the block
- JSON.stringify({}) returns '{}'
Also added proper string handling to match the NodeJS example's
'else if (typeof request.body === "string")' branch.
- Add standalone integration test for Relio API - Document Relio environment variables in .env.example - Test covers auth context, accounts, and wallets endpoints
Use Promise.all instead of sequential for-loop to fetch wallet details in parallel, improving performance ~3x for multiple wallets.
- Move standalone integration test from __tests__/ to scripts/test-relio.ts (matches existing pattern like test-delegation.ts) - Add unit tests for Relio signing logic and amount conversion (27 test cases covering buildCanonicalBody, createCanonicalString, convertRelioAmount, toRelioAmount)
The script now reads configuration from .env automatically, eliminating the need to set environment variables manually.
Replace partial API key logging with simple "Loaded" indicator to address clear-text logging of sensitive information warning.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Changes
src/integration/bank/services/relio.service.ts- Main service with Ed25519 signingsrc/integration/bank/dto/relio.dto.ts- TypeScript interfaces for Relio APIsrc/config/config.ts- Added Relio configurationsrc/integration/bank/bank.module.ts- Registered RelioServiceFeatures
getAuthContext()getAccounts(),getAccount(id)getWallets(),getWallet(id),getBalances()sendPayment(),createPaymentOrder(),cancelScheduledPayment()getFxQuote(),executeFxPayment()Configuration
Test plan
getAuthContext()to verify authenticationgetBalances()to verify wallet retrieval