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

* Add SafeAccount multi-account system

- Add SafeAccount and SafeAccountAccess entities
- Add SafeAccountService with legacy mode fallback
- Add SafeAccountController with CRUD endpoints
- Add SafeAccountReadGuard and SafeAccountWriteGuard
- Extend User, CustodyBalance, CustodyOrder with safeAccount relations
- Add database migration for new tables

* feat: renaming

* feat: small cleanup

* feat: refactoring

* feat: refactoring 2

* feat: refactoring 3

* fix: fixed format

---------

Co-authored-by: David May <david.leo.may@gmail.com>
@github-actions
Copy link
Author

github-actions bot commented Jan 14, 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, 61 high vulnerabilities

davidleomay and others added 7 commits January 14, 2026 12:57
MEXC and XT were defined as LiquidityManagementSystem enums with
full adapter implementations, but were missing from the
LiquidityManagementExchanges array.

This caused pendingExchangeOrders to not include MEXC/XT transfers,
leading to temporary balance dips in FinancialDataLog when funds
were transferred between exchanges (e.g., Binance → MEXC).

Co-authored-by: TaprootFreak <142087526+TaprootFreak@users.noreply.github.com>
…2937)

* feat: add ERC-1271 support for smart contract wallet authentication

Smart contract wallets (Gnosis Safe, Argent, EIP-4337 AA wallets) cannot
sign messages with ECDSA since they have no private key. ERC-1271 defines
a standard interface for contract-based signature verification.

Changes:
- Add ERC-1271 ABI (isValidSignature function)
- Extend verifyEthereumBased() to detect contracts via getCode()
- Add verifyErc1271Signature() for on-chain signature verification
- Initialize Ethereum provider in CryptoService for RPC calls
- Add unit tests for ERC-1271 logic

Flow:
1. Check if address has bytecode (is a contract)
2. If contract: call isValidSignature(hash, signature)
3. If EOA: use standard ECDSA recovery (unchanged)

* refactor: add logging and document multi-chain limitation for ERC-1271

- Add DfxLogger for debugging ERC-1271 verification
- Log successful/failed signature verifications at verbose level
- Document that ERC-1271 currently only supports Ethereum Mainnet
- Smart contract wallets on other chains (Polygon, Arbitrum, etc.) are not yet supported

* fix: handle RPC failures gracefully in ERC-1271 detection

If getCode() fails (network error, rate limiting), fall back to EOA
verification instead of failing the entire auth flow. This prevents
temporary RPC issues from blocking all EVM wallet authentication.

- Wrap getCode() in try-catch
- Log warning on RPC failure
- Fall back to standard EOA verification

* style: fix prettier formatting in test file

* feat: add multi-chain support for ERC-1271 contract wallet verification

- Add optional `blockchain` parameter to SignInDto for specifying
  which chain to use for ERC-1271 smart contract verification
- Initialize EVM providers for all supported chains on startup:
  Ethereum, Sepolia, Arbitrum, Optimism, Polygon, Base, Gnosis, BSC, Citrea
- Pass blockchain parameter through AuthService to CryptoService
- Use chain-specific provider for getCode() and isValidSignature() calls

When a smart contract wallet signs on Polygon/Arbitrum/etc., the
frontend can now pass `blockchain: "Polygon"` to ensure verification
uses the correct chain's RPC.

* fix: restrict blockchain parameter validation to EVM chains only

Change validation from @IsEnum(Blockchain) to @isin(EvmBlockchains)
to match the API documentation. Only EVM chains are valid for
ERC-1271 smart contract wallet verification.

* fix: pass blockchain parameter through companySignIn flow

The verifyCompanySignature method was not passing the blockchain
parameter to cryptoService.verifySignature, breaking ERC-1271
support for company/KYC-client sign-ins.

* feat: refactoring

* feat: refactoring 2

---------

Co-authored-by: David May <david.leo.may@gmail.com>
* [DEV-4532] auto set usedRef with recommendation

* [DEV-4532] Refactoring

* [DEV-4532] test defaultRef as usedRef
@TaprootFreak TaprootFreak merged commit 42e7c85 into main Jan 14, 2026
11 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.

4 participants