Fix duplicate code blocks and merge artifacts causing compilation errors - #545
Merged
DeFiVC merged 1 commit intoOct 1, 2026
Merged
Conversation
… files - Remove duplicate catch blocks in stellar/client.ts and stellar/transactions.ts - Remove duplicate code blocks in admin-users.service.ts and reward.service.ts - Remove duplicate method in quiz.controller.ts - Remove duplicate imports in webhook.service.ts and webhook-dispatcher.ts - Remove duplicate adminGuard function in auth.ts - Remove duplicate properties in config/index.ts - Fix syntax errors in credential.service.ts and quiz.service.ts - Fix missing closing braces in reward.service.ts and quiz.service.ts
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
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.
Closes #509, Closes #510, Closes #511, Closes #512
Type of Change
Summary
The codebase contains extensive merge artifacts where two versions of the same code were concatenated together, causing TypeScript compilation errors. This PR removes duplicate code blocks, duplicate imports, duplicate function definitions, and fixes syntax errors across11 source files.
Motivation / Context
Closes #509, Closes #510, Closes #511, Closes #512
The issues describe duplicate table definitions, duplicate function signatures, duplicate imports, and duplicate keys. While the specific files and line numbers mentioned in the issues don't match the current codebase (the code has been updated since the issues were created), the same type of merge artifact problems exist throughout the codebase. This PR fixes all the merge artifacts found in the source files.
Changes
Files fixed:
src/stellar/client.ts— Removed 3 duplicate catch blocks in submitTransaction, accountExists, getTransaction, and checkSorobanHealth methodssrc/stellar/transactions.ts— Removed duplicate catch block in contract invocationsrc/modules/admin/admin-users.service.ts— Removed duplicate error handling code block in deductCreditssrc/modules/admin/webhook.service.ts— Removed duplicate drizzle-orm importssrc/modules/credentials/credential.service.ts— Fixed syntax error (fontSize(12.')→fontSize(12))src/modules/quizes/quiz.service.ts— Removed duplicate class definition and fixed missing closing bracesrc/modules/quizzes/quiz.controller.ts— Removed duplicate archiveModuleQuiz method and fixed JSDoc commentsrc/modules/rewards/reward.service.ts— Removed duplicate error handling code and added missing closing bracessrc/services/webhook-dispatcher.ts— Removed duplicate first version of file and orphaned codesrc/middleware/auth.ts— Removed duplicate adminGuard function and duplicate importssrc/config/index.ts— Removed duplicate properties in test mode config objectTesting
Run
npm run typecheckto verify the fixes. Note: There are still remaining compilation errors in the codebase that are unrelated to merge artifacts (missing methods on CourseService, NestJS decorators in Fastify project, etc.). These are pre-existing issues that need separate attention.Tradeoffs
Focused on fixing merge artifacts only — did not address other compilation errors like missing methods or NestJS/Fastify mismatches.
Out of scope