Description
Wire up the deposit modal to actually lock assets in the Soroban pool contract using Freighter for transaction signing.
Requirements
- Build transaction in
/src/app/farm/page.tsx handleLockClick() function
- Use Soroban RPC
simulateTransaction before submission for fee estimation
- Call pool contract
lock_assets function with user-specified amount
- Request Freighter signature via
@stellar/freighter-api
- Submit signed transaction to Soroban RPC
- Show transaction status (pending → success → confirmed)
- Display transaction hash with Stellar Expert link
- Handle errors: insufficient balance, rejected signature, network failures
- Update UI after successful deposit without requiring page refresh
- Add input validation (non-zero amounts, max balance checks)
Acceptance Criteria
- ✅ User can input amount and click "Lock"
- ✅ Freighter popup appears for signature
- ✅ Transaction submits successfully to testnet
- ✅ Success/failure messages are shown
- ✅ User's position updates immediately after confirmation
- ✅ All edge cases have proper error messages
Estimated Effort: 8-12 hours
Priority: Critical
Labels: frontend, soroban, wallet-integration, typescript
Description
Wire up the deposit modal to actually lock assets in the Soroban pool contract using Freighter for transaction signing.
Requirements
/src/app/farm/page.tsxhandleLockClick()functionsimulateTransactionbefore submission for fee estimationlock_assetsfunction with user-specified amount@stellar/freighter-apiAcceptance Criteria
Estimated Effort: 8-12 hours
Priority: Critical
Labels: frontend, soroban, wallet-integration, typescript