Skip to content

Complete End-to-End Asset Locking Flow with Freighter Wallet #2

Description

@prodbycorne

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official Campaign

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions