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

fix: ID-1897: Improve wallet session management #2522

Merged
merged 8 commits into from
Feb 10, 2025

Conversation

haydenfowler
Copy link
Contributor

@haydenfowler haydenfowler commented Feb 5, 2025

Hi👋, please prefix this PR's title with:

This PR aims to improve the reliability of Passport by re-initialising the EOA when the wallet session has expired.

Summary

Detail and impact of the change

Changed

  • Passport: Improved wallet session management to reduce errors

Steps to test

  • Load up the SDK sample app
  • Open your browsers devtools and run the following commands:
await passport.login();
const magicAdapter = passport.magicAdapter;
const idToken = await passport.getIdToken();
const magicRpcProvider = await magicAdapter.login(idToken);
  • Run the following and note that a wallet address is returned:
await magicRpcProvider.request({ method: 'eth_accounts' });
  • Run the following to terminate the wallet session:
await magicAdapter.logout();
  • Run the following command. Note that you are able to obtain the wallet address despite the fact that we explicitly logged out previously:
await magicRpcProvider.request({ method: 'eth_accounts' });

Copy link

nx-cloud bot commented Feb 5, 2025

View your CI Pipeline Execution ↗ for commit 34fc5d7.

Command Status Duration Result
nx run-many --target=build --projects=@imtbl/sdk ✅ Succeeded 5s View ↗

☁️ Nx Cloud last updated this comment at 2025-02-10 02:23:38 UTC

@haydenfowler haydenfowler changed the title Feature/id 1897 improve magic session management ID-1897: Improve magic session management Feb 5, 2025
@haydenfowler haydenfowler changed the title ID-1897: Improve magic session management fix: ID-1897: Improve magic session management Feb 5, 2025
@haydenfowler haydenfowler changed the title fix: ID-1897: Improve magic session management fix: ID-1897: Improve wallet session management Feb 5, 2025
@haydenfowler haydenfowler marked this pull request as ready for review February 5, 2025 06:01
@haydenfowler haydenfowler requested a review from a team as a code owner February 5, 2025 06:01
@zaidarain1 zaidarain1 force-pushed the feature/ID-1897-improve-magic-session-management branch from d782743 to 95c2d72 Compare February 6, 2025 01:41
@haydenfowler haydenfowler added this pull request to the merge queue Feb 10, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 10, 2025
@haydenfowler haydenfowler added this pull request to the merge queue Feb 10, 2025
@haydenfowler haydenfowler removed this pull request from the merge queue due to a manual request Feb 10, 2025
@haydenfowler haydenfowler added this pull request to the merge queue Feb 10, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 10, 2025
@haydenfowler haydenfowler added this pull request to the merge queue Feb 10, 2025
Merged via the queue into main with commit c31b50f Feb 10, 2025
7 checks passed
@haydenfowler haydenfowler deleted the feature/ID-1897-improve-magic-session-management branch February 10, 2025 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants