[907] Frontend: Implement optimistic UI updates with rollback on transaction failure - #917
Merged
Conversation
Extract shared optimistic cache helpers, fix withdraw wallet-credit direction, restore exact pre-mutation snapshots on failure, and reconcile via onSettled invalidation. Closes Junirezz#907. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@Max-Owolabi Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Co-authored-by: Cursor <cursoragent@cursor.com>
Revert api-schemas tsconfig so contracts/backend CI are not triggered, build schemas with TypeScript 5.5 in E2E/Cypress, stabilize docs on share-price-math, and remove unused helpers that fail eslint. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Hoist vault mutation mocks, wrap WalletConnect with PreferencesProvider, relax modal null assertion, fix monospace style check, remove duplicate table bindings, and keep a single Cypress config file. Co-authored-by: Cursor <cursoragent@cursor.com>
Disable address masking in Navbar/WalletConnect tests, assert is-error, complete matchMedia stubs for VaultDashboard, and import preference helpers. Co-authored-by: Cursor <cursoragent@cursor.com>
Use live timestamps for summary/fee quotes and wait for deferred confetti. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Seed per-wallet preference to unmask identifiers and accept truncated or masked navbar address formats in deposit/portfolio E2E specs. Co-authored-by: Cursor <cursoragent@cursor.com>
…ates-with-rollback-on-transaction-failure
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
optimisticVaultCachehelpers for snapshot, apply, and exact rollback of deposit/withdraw React Query cachesonSettledinvalidation after success or failureCloses #907
Test plan
npm run test:run -- src/lib/optimisticVaultCache.test.ts src/hooks/useVaultMutations.test.tsx(18 passing)npm run buildinfrontend/