Feature/sdk history fixes batch - #681
Merged
Mimah97 merged 5 commits intoJul 27, 2026
Merged
Conversation
Stale swap execution risk: built swaps had no expiry, so a signed tx could sit around and execute far later at a bad price. buildSwapTx now accepts an optional deadline (unix seconds, defaults to now + 10min), forwards it as a contract call arg, and sets it as the tx's maxTime precondition so Stellar Core rejects a submission past the deadline (txTOO_LATE) independent of any contract-side check. Also fixes pre-existing malformed StrKey fixtures in swap.spec.ts (wrong length / invalid base32 chars) that were silently making most of the success-path tests fail before they even reached the new deadline assertions. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Prev/Next controls already existed but had two gaps: paging past the end of a shrinking data set could strand the user on a page that would always be empty, and an empty page (over-paging, stale total) rendered the same "no history yet" copy as a wallet with zero activity, which is misleading. - Wire an explicit shared PAGE_SIZE into the useSwaps/useLpActivity calls and the totalPages calculation, instead of relying on the hooks' default limit matching a separately hardcoded /20. - Clamp `page` back to the last valid page when totalPages shrinks below it. - Show a distinct "No results on this page" notice with a way back to page 1 when the current (non-first) page has no items, instead of reusing the zero-history empty state. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ng them usePoolTicks already fell back to synthetic placeholder ticks on a failed fetch (so the range-selector chart never went blank), but the catch block always reset error to null, so failures were invisible — callers had no way to know the chart was showing fake liquidity, and there was no way to retry the real fetch short of remounting. - Preserve the fetch error instead of discarding it, and expose retry() to re-trigger the load. - Document the partial-data policy: on failure, ticks stay populated with synthetic data (so the chart still renders) while error signals it's not live, letting the UI distinguish "no data" from "fake data". - Wire ticksError/onRetryTicks through AddLiquidity -> RangeSelector, which now shows a small warning banner with a retry action instead of presenting synthetic bars as real liquidity. - Extend usePoolTicks.test.ts (previously only covered usePools) with real coverage of the ticks hook: success, HTTP failure, network failure, retry-then-success, and unmount cancellation. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ositionPreview Est. APR was shown as a bare percentage with no indication of how it was derived, and a pool with no volume24h/feeApr data would render a misleading NaN%/0% figure instead of flagging that the estimate isn't available. - useAddLiquidity's preview now returns "N/A" for estimatedApr when volume24h or feeApr is missing/NaN, distinct from a pool with a confirmed zero volume (which the backend already prices as a real 0% per docs/FEE_APR_CALCULATION.md). - PositionPreview renders "N/A" with muted styling instead of "N/A%", and adds an info link next to "Est. APR" pointing to docs/FEE_APR_CALCULATION.md so the calculation assumptions are reachable from the UI. - Add coverage for both: useAddLiquidity.test.ts for the N/A branching, PositionPreview.test.tsx for the rendered percentage/N/A/doc-link states. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
Related issues
Type of change
Checklist