Skip to content

Conversation

@github-actions
Copy link

Automatic Release PR

This PR was automatically created after changes were pushed to develop.

Commits: 1 new commit(s)

Checklist

  • Review all changes
  • Verify CI passes
  • Approve and merge when ready for production

* 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
@github-actions
Copy link
Author

github-actions bot commented Jan 13, 2026

⚠️ Non-Conventional Commits (2)

The following commits don't follow conventional commit format:

Expected: type(scope): description
Types: feat, fix, refactor, test, ci, docs, chore, perf, style, build, revert


⚠️ Security: 0 critical, 65 high vulnerabilities

TaprootFreak and others added 4 commits January 13, 2026 13:14
* 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 TaprootFreak requested a review from Danswar January 13, 2026 14:57
@TaprootFreak TaprootFreak merged commit 94a3379 into main Jan 13, 2026
9 checks passed
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.

5 participants