Skip to content

feat(transfers): real on-chain P2P OLTIN transfers + indexer-backed history - #47

Merged
temrjan merged 1 commit into
mainfrom
feat/stage2-transfers
Jul 28, 2026
Merged

feat(transfers): real on-chain P2P OLTIN transfers + indexer-backed history#47
temrjan merged 1 commit into
mainfrom
feat/stage2-transfers

Conversation

@temrjan

@temrjan temrjan commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Stage 2 (scope-C). Real wallet-signed OLTIN P2P transfer (viem, receipt-gated) replacing the phantom ledger; history from GET /transactions (indexer). Backend: GET /users/lookup. Gate-2 APPROVED (все 3 ревью + on-chain премисса подтверждены). Gates green: api 163 passed/2 skip + ruff + mypy(users/); webapp tsc + eslint 0 err + vitest 13/13 (red→green). On-chain proven: viem→zkSync transferOltin receipt.status=success (tx 0xbda66515); indexer enabled + picks up events. Report: .claude/reports/2026-07-28-stage2-transfers.md. Follow-ups (non-blocking): receipt-timeout error text; auth on /users/search.

…istory

Stage 2. Replace the phantom /transfers ledger with a real OLTIN transfer
signed by the user's own non-custodial wallet, and swap transaction history
onto the on-chain indexer (GET /transactions).

Backend:
- GET /users/lookup?oltin_id= — resolve a recipient to their wallet address
  (auth-gated, reuses get_user_by_oltin_id normalization; 404 if unknown,
  wallet_address null when the recipient never onboarded)

Frontend:
- send: resolve recipient address, sign OLTIN.transfer via viem, WAIT for
  receipt.status === 'success' (a broadcast hash alone can revert); amount
  parsed to wei with parseTokenAmount (never parseFloat — 18-decimal money
  path), balance checked in wei; self-transfer blocked; truncated address
  shown on confirm; the fake 1% fee is gone (V3 takes none — full amount
  moves, sender pays ETH gas); the phantom internal-accounts tab is removed
- wallet: recent transactions read GET /transactions (real, indexer-backed);
  a missing wallet / 400 falls through to the empty state, not an error
- contracts: point OLTIN at V3 (the retired V2 address was dead)
- add lib/format.parseTokenAmount + vitest; useTransactions hook; Transaction
  + UserLookupResult types
@temrjan
temrjan merged commit ccdca0f into main Jul 28, 2026
2 checks passed
@temrjan
temrjan deleted the feat/stage2-transfers branch July 28, 2026 16:24
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.

1 participant