Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import by url cancel fix #6291

Merged
merged 3 commits into from
Jan 30, 2025
Merged

Import by url cancel fix #6291

merged 3 commits into from
Jan 30, 2025

Conversation

mstrasinskis
Copy link
Contributor

@mstrasinskis mstrasinskis commented Jan 29, 2025

Motivation

When imported token validation fails (for reasons other than an invalid ID format or token duplication), clicking the Cancel button does not close the modal, which is undesirable. This happens because the Cancel button only updates showImportTokenModal but does not remove import-ledger-id from the URL, causing the modal to remain open (the logic to open the modal)

Changes

  • Remove query params from URL on cancel.
  • Drive-by changes: Ensure consistent behavior by dispatching dispatch("nnsClose") before navigating to the already imported token.

Tests

  • Added and verified that it fails w/o this fix.

Todos

  • Add entry to changelog (if necessary).
    Not necessary.

@mstrasinskis mstrasinskis marked this pull request as ready for review January 29, 2025 21:23
@mstrasinskis mstrasinskis requested a review from a team as a code owner January 29, 2025 21:23
@mstrasinskis mstrasinskis added this pull request to the merge queue Jan 30, 2025
Merged via the queue into main with commit 6ab52d2 Jan 30, 2025
32 checks passed
@mstrasinskis mstrasinskis deleted the import-by-url-cancel-button-fix branch January 30, 2025 12:50
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.

3 participants