Skip to content

fix(defi): flatten src/defi/defi/ redundant nesting#20

Open
Tyler7x wants to merge 1 commit into
SourceXXL:mainfrom
Tyler7x:feat/flatten-defi-directory
Open

fix(defi): flatten src/defi/defi/ redundant nesting#20
Tyler7x wants to merge 1 commit into
SourceXXL:mainfrom
Tyler7x:feat/flatten-defi-directory

Conversation

@Tyler7x

@Tyler7x Tyler7x commented Jun 18, 2026

Copy link
Copy Markdown

Summary

  • Closes Flatten the src/defi/defi/ Nested Directory #5
  • Removes the redundant src/defi/defi/ nested directory by moving all 19 files up one level to src/defi/
  • Updates all affected import paths (entity files, trade controller, app.module.ts)
  • Replaces the older src/defi/protocols/aave.adapter.ts and protocol-adapter.interface.ts with the more complete versions from src/defi/defi/protocols/
  • Result is consistent with the flat structure used by other domain modules (e.g. src/investment/portfolio/)

Changes

  • src/defi/defi/*.tssrc/defi/*.ts (defi.controller, defi.module, trade.controller, trade-lock.service)
  • src/defi/defi/dto/src/defi/dto/
  • src/defi/defi/entities/src/defi/entities/
  • src/defi/defi/services/src/defi/services/
  • src/defi/defi/protocols/src/defi/protocols/
  • src/app.module.ts: updated DeFiModule import and all 5 DeFi entity imports from ./defi/defi/./defi/
  • src/defi/trade.controller.ts: ../../core/auth/jwt.guard../core/auth/jwt.guard
  • Entity files: ../../../core/user/entities/user.entity../../core/user/entities/user.entity

Test plan

  • npm run build compiles successfully with no errors
  • Verify all API endpoints remain functional after deployment
  • Check DeFi module loads correctly in NestJS bootstrap

Moves all files from the nested src/defi/defi/ directory up one level
to src/defi/, matching the flat structure used by other domain modules.

- git mv all 19 files: controllers, module, dto, entities, services, protocols
- Update src/defi/trade.controller.ts import: ../../core/auth → ../core/auth
- Update entity imports: ../../../core/user/entities → ../../core/user/entities
- Update src/app.module.ts: ./defi/defi/ → ./defi/ for module and entity imports
- Replace src/defi/protocols/aave.adapter.ts and protocol-adapter.interface.ts
  with the more complete versions from src/defi/defi/protocols/
- Remove empty src/defi/defi/ directory

Closes SourceXXL#5
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.

Flatten the src/defi/defi/ Nested Directory

2 participants