Implement deposit lock assets flow#61
Open
Sparexonzy95 wants to merge 1 commit into
Open
Conversation
a7550cc to
176650a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #19
Overview
This PR implements the full deposit / lock-assets flow for farm pools.
Previously, users could view farm pool rows, but there was no complete production path for depositing or locking assets into a pool. The existing deposit interaction did not complete the required Soroban
lock_assetstransaction flow.This update adds the full end-to-end path: amount entry, balance validation, fee simulation, Freighter signing, transaction submission, confirmation polling, and UI refresh after success.
What changed
Farm deposit UI
+ Depositaction to farm pool rows.Soroban lock-assets flow
Implemented the
lock_assets(user: Address, amount: i128)flow using:TransactionBuilderrpcServer.simulateTransactionrpc.assembleTransactionwalletApi.signTransactionrpcServer.sendTransactionrpcServer.getTransactionpolling until final success or failureThe deposit amount is converted from display units into Stellar’s 7-decimal smallest unit before being encoded as
i128.React Query refresh
After a successful deposit, the relevant React Query caches are invalidated so the UI refreshes automatically, including:
E2E coverage and CI fixes
Updated the E2E setup so the deposit flow can be tested reliably in CI.
This includes:
e2e/playwright.config.tspnpm install --frozen-lockfilebehavior in CITests
Added/updated test coverage for:
lock_assetsfunction namei128amount encoding1.25to12500000Supporting cleanup
A few build and test blockers in the upstream-synced branch were cleaned up so the deposit flow could compile and pass CI. This included farm page cleanup, type fixes, Next route compatibility, E2E configuration fixes, and small component/test updates.
The functional scope remains focused on implementing and validating the farm deposit /
lock_assetsflow.Verification
pnpm install --frozen-lockfilepnpm run testpnpm run buildpnpm run playwrightGitHub Actions
E2E Tests / e2echeck passed