Repository navigation
Pass coin type and receiver in the correct USDC transfer order #84
Description
Problem
TransferUSDC passes receiver before coin type, but chainBackend.TransferCoins expects amount, coin type, receiver. The current wallet-free guard prevents execution while disabled; the enabled wrapper still calls the backend with swapped values.
Proposed change
Make the wrapper obey the declared backend argument contract and validate supported currency/network mapping before transfer.
Acceptance criteria
- A recording backend receives the exact requested amount, configured USDC coin type and receiver in their declared positions.
- Unsupported network/currency or invalid receiver returns an error before transfer; disabled mode never invokes the backend.
- Cover both direct TransferUSDC and existing payout/refund call sites so their parameter conventions remain consistent.
- Use a local fake backend without funds or external chain calls.
Current evidence
confirmed transfer argument-order defect; source inspection only, no new runtime reproduction. Backlog classification is based on source inspection; this issue does not claim a new runtime reproduction.
- internal/dispatcher/payments/payments.go: TransferCoins expects amount, coin type, refund/receiver address.
- internal/dispatcher/payments/payments.go: TransferUSDC supplies receiver before coin type.
Related work
These are integration points, not prerequisites for starting this issue.
- #82 — Propagate enabled Sui backend construction errors and validate dependencies
Priority context
Optional monetary backend work; no fabricated urgency for the disabled local alpha.
Activation
Optional work, deferred while the local team alpha is the priority. Development and fault injection use owned local fixtures. Production monetary operation, deployment and publication require the applicable release and operator approvals.
Validation must use owned local fixtures on supported Linux environments. Record the implementing merge request and relevant test results before closing this issue.
Imported from GitLab issue 83. Originally opened 2026-09-10. Historical GitLab links may require access to the original project.
Activity
Validate a listed coin's object id before normalizing it
ctfbruce commentedon Oct 5, 2026
Implemented in #369, with payout/refund coverage in #381. Recording backends verify amount, USDC coin type and receiver positions across direct transfers, payouts and refunds. Invalid inputs fail before transfer, and disabled mode invokes no backend. The local fixture suites passed #369 CI and #381 CI, each with 16 successful checks. Production monetary activation remains separate.