Unused variables on main hide logic that was lost in merges (previousStatus, existingPool, callerUserId…)

Open
#605 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@urielit1313-creator is already working on this.

Since Oct 13, 2026.

  • #631 by @urielit1313-creator — open
  • #656 by @yggdrasilworld — closed without merging

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
eslint, typescript
Domain
backend

Research direction

Start with the open pull requests #631 and #656, since two linked PRs already target this cleanup. The unused bindings are in bounties.service.ts (previousStatus in markMergedAndRelease, callerUserId in create), maintenance-pool.service.ts (existingPool and existingPayment), repo-scope.guard.ts (ROLES_KEY) and bounties.controller.ts (ClaimBountyDto). Done means eslint no-unused-vars passes, and the previousStatus rollback question is answered explicitly, either restored or removed on purpose.

Written by the indexing model from the issue text.

Description

bug good first issue

Problem

eslint reports no-unused-vars errors at:

  • bounties.service.ts:165: previousStatus assigned in markMergedAndRelease and never used, which suggests the status rollback on release failure was dropped.
  • bounties.service.ts:38: callerUserId param of create ignored, so the sponsor identity comes from the DTO (#40).
  • maintenance-pool.service.ts:88: existingPool fetched and ignored in the race-loser branch.
  • maintenance-pool.service.ts:147: existingPayment (dead lookup).
  • repo-scope.guard.ts:16: ROLES_KEY.
  • bounties.controller.ts:22 and its spec: ClaimBountyDto.

Suggested fix

Remove or reconnect each one. In particular, confirm whether previousStatus was supposed to restore the bounty on a failed release.

Related: #46, #259

Dominant language
TypeScript
Stars
2
Forks
90
Avg merge
31m
Merged PRs (30d)
20

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MergeFi/backend

All issues in MergeFi/backend

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.