Balance ttl extension - #309
Open
Benedict315 wants to merge 10 commits into
Open
Conversation
- Add decimals field to Token interface - Update toStroops/fromStroops to accept decimals parameter - Update PaySplit to use token's actual decimals for conversion - Add decimals input field to TokenPicker for custom tokens - Add comprehensive tests for decimal conversion functions - Set XLM to 7 decimals, USDC to 6 decimals in TOKENS array Fixes issue where amount inputs assumed 7 decimals, causing mis-scaling for custom tokens with different decimal places.
… to all form inputs - Add visually-hidden CSS class - Make split cards keyboard accessible - Improve muted text contrast for WCAG AA compliance
…for recursive nested split rendering - Display nested splits as expandable tree with toggle buttons - Fetch child splits on demand when expanded - Show shares for each recipient in the tree - Add tree styling with depth-based indentation - Maintain accessibility with aria-labels and keyboard support
…tension in credit() when writing Balance entries - Add TTL extension in distribute() when reading Balance entries - Add TTL extension in balance() when reading Balance entries - This prevents archival of long-parked escrow funds - Add test to verify TTL extension behavior - Update architecture docs to document TTL extension for Balance keys
Contributor
|
|
Contributor
|
Update: the failure here has changed since my last comment — |
…formatting in contracts/splitter/src/test.rs - Add vitest imports to app/src/lib/tributary.test.ts
Spagero763
enabled auto-merge (squash)
July 27, 2026 05:42
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.
Problem Fixed
DataKey::Balance(id, token) entries were never TTL-extended, causing long-parked escrow funds to be archived and requiring manual RestoreFootprint operations to access them.
Changes Made
Added TTL extension in credit() when writing Balance entries
Added TTL extension in distribute() when reading Balance entries
Added TTL extension in balance() when reading Balance entries (only when amount > 0)
All extensions use existing TTL_THRESHOLD (30 days) and TTL_EXTEND_TO (120 days) constants
Files Modified
lib.rs - Added extend_ttl calls in credit(), distribute(), and balance()
test.rs - Added test balance_ttl_is_extended_on_write_and_read
architecture.md - Updated storage layout documentation
CI Gates - All Passed
✅ cargo fmt --all
✅ cargo clippy --all-targets -- -D warnings
✅ cargo test (28 tests passed, including new TTL test)
closes #250