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

Fixed cross window page reload on internal logout #1350

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

razvantomegea
Copy link
Contributor

Issue

Automatic reply with cancelled is triggered when Ledger is disconncted, but previously logged in.

Reproduce

  • Login in a DApp via web wallet cross window with ledger;
  • Disconnect Ledger device;
  • Try to sign a transaction
  • Automatic Transaction cancelled is triggered

Root cause

When the provider is not initialised, but the address is present in sdk-dapp, an internal logout is triggered, which makes the page redirect to unlockRoute. Page redirects or reloads cause the cross-window tab to close and trigger automatic transaction cancel.

Fix

Prevent redirects when we are in cross window and the redirect origin is the same as the current origin.

Contains breaking changes

  • No
  • Yes

Updated CHANGELOG

  • No
  • Yes

Testing

  • User testing
  • Unit tests

@razvantomegea razvantomegea merged commit 1f4563a into development Dec 17, 2024
1 check passed
@razvantomegea razvantomegea deleted the rt/fix/logout-redirect-cross-window branch December 17, 2024 08:35
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