-
Notifications
You must be signed in to change notification settings - Fork 18
Release: develop -> main #2917
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
Merged
Merged
Release: develop -> main #2917
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
* feat(liquidity-management): add swap command to DfxDexAdapter
Add new 'swap' command for cross-asset liquidity acquisition via DEX.
Unlike 'purchase' (same asset), 'swap' allows converting one asset to
another, e.g., USDC → EURC via Uniswap.
- Add SWAP to DfxDexAdapterCommands enum
- Implement swap() method with source asset from params
- Add param validation for sourceAsset parameter
- Reuse checkSellPurchaseCompletion for order tracking
Usage: Action params {"sourceAsset": "USDC"} with rule targetAsset EURC
will swap available USDC to EURC via the configured DEX pool.
* refactor: consolidate SWAP into PURCHASE/SELL with tradeAsset parameter
- Remove SWAP command from DfxDexAdapterCommands enum
- Add optional tradeAsset parameter to PURCHASE and SELL commands
- Add resolveTradeAsset() helper for cross-asset operations
- Add validateTradeAssetParams() for parameter validation
When tradeAsset is provided, the command uses it as the source asset
for cross-asset operations (e.g., USDC → EURC via DEX).
When not provided, behavior remains unchanged (same-asset operation).
This creates a symmetric API where both PURCHASE and SELL support
cross-asset operations through a single optional parameter.
* refactor: simplify tradeAsset - only for PURCHASE, not SELL
- Remove tradeAsset support from SELL (sellLiquidity not implemented for any asset)
- Simplify return type to Asset instead of Awaited<ReturnType<...>>
- Keep SELL with original simple implementation
* perf: avoid unnecessary async call when no tradeAsset provided
* style: fix prettier formatting
* feat: cleanup + added sell
* fix: fixed swap amounts
---------
Co-authored-by: David May <david.leo.may@gmail.com>
* [DEV-4424] Implemented forwarded pay-in return * [DEV-4424] Fix tests
Author
|
* feat(aml): add NAME_TOO_SHORT check for bank payout validation
Add AML check to reject transactions where the user's name contains
fewer than 4 letters. Banks require a minimum name length for processing.
Changes:
- Add AmlError.NAME_TOO_SHORT with CRUCIAL type and FAIL status
- Add AmlReason.NAME_TOO_SHORT
- Add countLetters() helper to count only alphabetic characters
- Add name length validation in getAmlErrors() after NAME_MISSING check
- Update SiftAmlDeclineMap and TransactionReasonMapper
The check uses verifiedName, bankData.name, or completeName (in that order)
and counts only letters (including European special characters like ä, ö, ü, ß).
* feat(i18n): add name_too_short chargeback reason translations
Add email translations for NAME_TOO_SHORT AML reason in all 6 languages:
- EN, DE, FR, IT, ES, PT
This text is shown to users when their transaction is refunded due to
the account holder name having fewer than 4 letters, which banks
require for processing payouts.
* fix: use Unicode property escape for letter counting
Replace hardcoded character list with \p{L} Unicode property escape
to correctly count letters in all languages (Scandinavian, Polish,
Czech, Turkish, etc.).
Before: 'Åse Ødegård' counted as 6 letters (å, Ø ignored)
After: 'Åse Ødegård' counted as 10 letters (correct)
* fix: use Sepolia blockchain for REALU on DEV/LOC On DEV and LOC environments, REALU transactions were being broadcast to Ethereum Mainnet instead of Sepolia testnet. This caused the sell confirm flow to fail since actual tokens are on Sepolia. Change tokenBlockchain to be environment-aware: use Sepolia on DEV/LOC, Ethereum on PROD/STG. * fix: support Sepolia for EIP-7702 delegation on DEV/LOC Update isDelegationSupportedForRealUnit() to accept Sepolia blockchain on DEV/LOC environments. Without this, the EIP-7702 transfer would fail with 'delegation not supported' error even though the asset blockchain is correctly set to Sepolia. * fix: update buy simulation to use Sepolia REALU on DEV/LOC Since TransactionRequests are now created with Sepolia REALU asset, the buy simulation must also search for Sepolia REALU targetId. - Remove mainnet REALU lookup (no longer needed) - Search for Sepolia REALU targetId instead of mainnet - Update tests to match new behavior * fix: always use Mainnet asset for REALU price lookups Price data is only available for Mainnet REALU asset. Add separate getMainnetRealuAsset() method for price-related functions while keeping getRealuAsset() environment-based for transactions. - getRealUnitPrice() now uses Mainnet asset - getHistoricalPrice() now uses Mainnet asset - Transaction methods (buy/sell) still use environment-based asset * refactor RealUnitDevService variables. * chore: revert fetch prices only from mainnet. --------- Co-authored-by: TuanLamNguyen <xnguyen.lam@gmail.com>
Empty strings in bankData.name bypass nullish coalescing fallback logic because ?? treats "" as a present value. This causes incorrect behavior in AML name resolution where empty strings are used instead of actual user data. Add @Transform decorator to name field in CreateBankDataDto and UpdateBankDataDto that trims whitespace and converts empty strings to null, preventing invalid data at the source. Closes #2911
TaprootFreak
approved these changes
Jan 13, 2026
davidleomay
approved these changes
Jan 13, 2026
Danswar
approved these changes
Jan 13, 2026
5 tasks
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.
Automatic Release PR
This PR was automatically created after changes were pushed to develop.
Commits: 1 new commit(s)
Checklist