Join the discussion on Telegram
Why this matters
Issue #505 covered the named-constants pass in this file but only enumerated the simulated-tx flow magic literals. There is still a small set of unexplained magic in the file that the previous PR didn't itemize:
backend/src/services/sorobanService.ts:
- Line 8:
const STALE_THRESHOLD_MS = 30_000; — explained as 30s with no rationale comment
- Line 56:
new Account('GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN', '0') — placeholder source account inlined twice (once here)
- Line 60:
fee: '100' — for simulation calls
- Line 91:
fee: '1000' — for real submit calls
- Lines 68, 98:
.setTimeout(30) — explained as seconds but not labeled
Acceptance criteria
Files to touch
backend/src/services/sorobanService.ts (lines 8, 56, 60, 68, 91, 98)
Out of scope
- Rewriting the dual-mode (simulate vs submit) abstraction itself
Join the discussion on Telegram
Why this matters
Issue #505 covered the named-constants pass in this file but only enumerated the simulated-tx flow magic literals. There is still a small set of unexplained magic in the file that the previous PR didn't itemize:
backend/src/services/sorobanService.ts:const STALE_THRESHOLD_MS = 30_000;— explained as 30s with no rationale commentnew Account('GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN', '0')— placeholder source account inlined twice (once here)fee: '100'— for simulation callsfee: '1000'— for real submit calls.setTimeout(30)— explained as seconds but not labeledAcceptance criteria
SIMULATION_FEE,SUBMIT_FEE,TX_TIMEOUT_SECONDS,SIMULATION_PLACEHOLDER_ACCOUNTsimulateContractCallandsubmitContractCallFiles to touch
backend/src/services/sorobanService.ts(lines 8, 56, 60, 68, 91, 98)Out of scope