Paradaux
0

Ability to add a memo for /firm deposit

Allow an optional memo/note when using /firm deposit, so the deposit shows a reason in transaction history.

Technical notes — The TransferRequest ledger-message field already exists and is rendered in history (MiscCommands.transactions shows the message column), but FirmTransactionServiceImpl.deposit hardcodes "Business deposit". Add an optional greedy memo arg to the deposit route (@Route("deposit <firm> <amount> <memo>")), thread it through deposit(…, String memo) into the TransferRequest message (fallback to "Business deposit"). Small and self-contained.

Comments

tesks · Jun 4, 2026, 9:56 AM

Code context — The TransferRequest ledger-message field already exists and is rendered in history (MiscCommands.transactions shows the message column), but FirmTransactionServiceImpl.deposit hardcodes "Business deposit".

Approach: add an optional greedy memo arg to the deposit route (@Route("deposit <firm> <amount> <memo>")), thread it through deposit(…, String memo) into the TransferRequest message (fallback to "Business deposit" when absent). Small, self-contained.

tesks · Jun 5, 2026, 7:33 AM

Implemented on develop (commit ba188aa).

/firm deposit <firm> <amount> [memo…] — added a greedy-<memo> route alongside the existing two-arg form. The note is recorded as the Treasury transfer reason, so deposits show up in transaction history annotated (e.g. "Business deposit: payroll top-up").

  • FirmTransactionService.deposit(firmId, player, amount, memo) overload added; the old three-arg method delegates with null.
  • Memo is whitespace-collapsed + trimmed; the composed reason is capped to the VARCHAR(255) reason column. Blank/null memo → unchanged "Business deposit".
  • Command refactored to a shared doDeposit(...) helper so both routes share one body.

Tests: added 3 cases to FirmTransactionServiceImplTest (memo recorded + sanitized, blank-memo fallback, overlong-memo cap). Coverage gate (≥95%) green.

Activity

  • ParadauxIO linked a commit — Commit ba188aa — Allow an optional memo on /firm deposit (PAR-10)Jun 7, 2026, 2:49 PM
  • ParadauxIO changed status to Status → DoneJun 7, 2026, 2:49 PM
  • ParadauxIO linked a pull request — PR #6 merged — Release: develop → mainJun 7, 2026, 2:49 PM
  • ParadauxIO linked a pull request — PR #6 open — Release: develop → mainJun 7, 2026, 12:36 AM
  • ParadauxIO linked a pull request — PR #6 open — Release: develop → mainJun 6, 2026, 11:49 PM
  • ParadauxIO linked a pull request — PR #6 open — Release: develop → mainJun 6, 2026, 12:44 PM
  • ParadauxIO linked a pull request — PR #6 open — Release: develop → mainJun 6, 2026, 11:17 AM
  • ParadauxIO linked a pull request — PR #6 open — Release: develop → mainJun 6, 2026, 11:11 AM
  • ParadauxIO linked a pull request — PR #6 open — Release: develop → mainJun 5, 2026, 12:35 PM
  • tesks commentedJun 5, 2026, 7:33 AM
  • tesks changed status to Status → Pending ReleaseJun 5, 2026, 7:33 AM
  • ParadauxIO linked a commit — Commit ba188aa — Allow an optional memo on /firm deposit (PAR-10)Jun 5, 2026, 7:33 AM
  • tesks description: Description updatedJun 4, 2026, 10:01 AM
  • tesks commentedJun 4, 2026, 9:56 AM
  • tesks assigned Assigned to rianJun 4, 2026, 9:27 AM