Skip to content

fix(swap): return to home when Close is tapped mid-submission - #3024

Open
daniel-carroll-stellar wants to merge 2 commits into
stellar:masterfrom
daniel-carroll-stellar:fix/swap-close-returns-home
Open

daniel-carroll-stellar wants to merge 2 commits into
stellar:masterfrom
daniel-carroll-stellar:fix/swap-close-returns-home

Conversation

@daniel-carroll-stellar

@daniel-carroll-stellar daniel-carroll-stellar commented Sep 30, 2026 •

Copy link
Copy Markdown

Closes #2446

What

Tapping Close on the "Swapping…"/"Sending…" screen called window.close(), which closed the whole extension popup. It now navigates to the home screen as intended.

Tests

  • Added a regression test: clicks Close mid-submission, asserts the home route renders and window.close is not called.
  • Manually tested a swap in Chrome
  • Manually tested in Firefox

Screenshots

New behavior:

Screen.Recording.2026-09-30.at.12.19.34.PM.mov

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@daniel-carroll-stellar
daniel-carroll-stellar marked this pull request as ready for review September 30, 2026 16:31
piyalbasu added a commit that referenced this pull request Oct 6, 2026
* test(e2e): stub v1 balances in the unfunded-swap test

"Swap doesn't throw error when account is unfunded" logs in with the
unstubbed login() helper, which blocks on the TESTNET balances response.
#2906 replaced the test's v1 stub with a v2-only one, but the client still
defaults to v1 (use_balances_v2 is false unless Amplitude enables it), so the
v1 request went to the real indexer. On fork PRs and dependabot runs CI has
no INDEXER_URL secret and builds with http://indexer.invalid; the request
fails, no response event fires, and the test times out on every retry
(e.g. #3024, run 36743657621).

Stub v1 /account-balances/ as unfunded alongside the v2 route, matching
collectiblesEmptyStateCta.test.ts. Verified 2026-10-06 against a local build
with INDEXER_URL=INDEXER_V2_URL=http://indexer.invalid: fails before the
change at helpers/login.ts:61, passes 3/3 after.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(e2e): correct "v2 is the default balances source" comments

The client defaults to v1 balances (use_balances_v2 is false unless
remote config enables it). The same false belief led #2906 to drop the
v1 stub from the unfunded-swap test; fix the two remaining copies so the
pattern isn't repeated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

@piyalbasu piyalbasu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! The tests were failing for an unrelated reason (that I just fixed), so this is now ready to merge 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Swap: close should go back to home screen

2 participants