Batch fix: wallet error boundary, resize debounce, dead error variant, mocked test auth - #371
Merged
ALLEN-AYODEJI merged 2 commits intoAug 30, 2026
Conversation
…riant, mocked test auth - frontend(Trellis-Ecosystem#301): wrap WalletConnect in a dedicated WalletErrorBoundary so a Freighter extension failure shows an inline retry instead of crashing the app - perf(Trellis-Ecosystem#300): debounce NetworkBackground's resize handler to 200ms and skip recalculation when the physical canvas size hasn't changed - refactor(contract, Trellis-Ecosystem#302): remove the dead-code NoFundsToRefund error variant, leaving discriminant 6 vacant with a comment explaining why - fix(contract test, Trellis-Ecosystem#303): replace env.mock_all_auths() with targeted auth_as() calls in test.rs, and replace the always-true event assertion in test_happy_path with a real check of event names/order Closes Trellis-Ecosystem#301, Closes Trellis-Ecosystem#300, Closes Trellis-Ecosystem#302, Closes Trellis-Ecosystem#303
|
@Lost-Z 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! 🚀 |
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.
This PR was implemented but not tested or compiled/run — per explicit request, no
cargo test,npm test, or manual verification was performed. Please build/test before merging, especially the Rust contract test changes intest.rs(event-topic decoding viaSymbol::try_from_val), which use a soroban-sdk testutils pattern that has not been compiled in this session.Summary
Bundles four independent fixes into one PR:
WalletErrorBoundaryand wrapWalletConnectin the navbar with it, so a Freighter extension throw during detection/connection shows an inline fallback with a retry button instead of crashing the whole app. Errors are logged viaconsole.errorincomponentDidCatch.NetworkBackground's resize handler now debounces to 200ms (was a 100ms throttle) and skips the resize/recalibration work entirely when the physical canvas size hasn't actually changed. Particle positions continue to be preserved (scaled) across resizes via the existingrecalibrateParticles.NoFundsToRefunderror variant fromTrellisError(discriminant 6, never returned by any codepath). Discriminant 6 is left vacant with a comment explaining why, per the enum's append-only stability rule. No CLI or frontend code referenced this variant.env.mock_all_auths()calls incontracts/trellis_core/src/test.rswith targetedauth_as(&env, &payer)calls (verifiedinitonly requires the payer's auth), and removed two mock-auth calls guardingextend_agreement_ttl, which has norequire_auth()gate at all. Replaced the always-trueall_events.is_empty() || all_events.len() >= 4assertion intest_happy_pathwith a real check that the escrow contract's own events fire in order (created → locked → submitted → released), decoding each event's topic-0 symbol.Test plan
cargo test -p trellis_core(contract changes are unverified — see warning above)npm run build/npm testinfrontend/Closes #301
Closes #300
Closes #302
Closes #303