Skip to content

D616: remove five dead and redundant client methods (#1316) - #1328

Open
jloa-dev wants to merge 1 commit into
AxalNetwork:mainfrom
jloa-dev:fix/remove-dead-api-methods-d616
Open

jloa-dev wants to merge 1 commit into
AxalNetwork:mainfrom
jloa-dev:fix/remove-dead-api-methods-d616

Conversation

@jloa-dev

@jloa-dev jloa-dev commented Oct 6, 2026

Copy link
Copy Markdown

Closes #1316

Summary

Removes five client API methods identified in #1165's audit (areas 6 and 7) that are never called by any screen in \ rontend/src:

  • \emailSendDeal: No Worker route exists (production returns 404). Removed line \POST /api/email/send-deal\ from \scripts/api-drift-baseline.json.
  • \�dminVoidContract: Sent no reason, consistently resulting in 400. Replaced in actual usage by \�dminVoidContractWithReason.
  • \ undLPs: Duplicate of \ undsLpsList\ already used across 5 screens.
  • \ undsListByStatus: Redundant alias identical to \ undsList.
  • \ rustSanctions: Duplicate of \ rustListSanctions\ used by /trust.

Preserves near-twins \ undGet\ and \ undsGet\ as specified.

Files changed

  • \ rontend/src/lib/api.js\
  • \scripts/api-drift-baseline.json\
  • \documentation/architecture/decisions/D616.md\

Verification


  • ode scripts/check-api-drift.mjs\ passes with 0 new drift (pre-existing baseline reduced from 7 to 6).

  • ode scripts/check-decision-ids.mjs\ passes.
  • \git grep\ finds none of the 5 removed methods in \ rontend/src.

Copy link
Copy Markdown
Contributor

S1: Review: the code is ready. I read it only; CI has not run, because workflow runs on a fork wait for a maintainer. That run is what #1316's "Done when" needs: npm run build, then npm run test:drift.

All of #1316 is here:

  • The five methods are removed, one line each.
  • The POST /api/email/send-deal line is removed from the drift baseline. Re-adding the method would now fail test:drift.
  • fundGet and fundsGet are kept.
  • Each reason checks out against the code:
    • no Worker route serves send-deal;
    • the void route refuses a reason shorter than five characters;
    • fundsLpsList has screen callers, and no caller passes a status to fundsList();
    • trustListSanctions and adminVoidContractWithReason are used.
  • No test pins a removed name. The baseline's readers check only upper bounds.
  • backend/ is untouched.

Non-blocking, on D616.md:

  • Line 33. Say git grep -w. A plain git grep adminVoidContract finds two hits inside the kept adminVoidContractWithReason.
  • Lines 31 and 34 cite 1,808 examined calls and passing suites, but the PR ran only check-api-drift.mjs and check-decision-ids.mjs. Let CI's run stand as the evidence.

Generated by Claude Code

This branch has not been deployed

No deployments
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.

Remove five dead client methods: one has no Worker route, one always fails, three repeat a method in use (D616)

2 participants