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

chore: improve session dx #502

Merged
merged 1 commit into from
May 23, 2024
Merged

chore: improve session dx #502

merged 1 commit into from
May 23, 2024

Conversation

joepegler
Copy link
Collaborator

@joepegler joepegler commented May 20, 2024

Abstracts away storageClient + sessionIDInfo.

Users now only need to keep the users smartAccountAddress when returning to use a session


PR-Codex overview

The focus of this PR is to update version to 4.4.3, enhance session storage abstraction, and improve testing workflows.

Detailed summary

  • Updated version to 4.4.3
  • Enhanced session storage abstraction
  • Improved testing workflows with new environment variables
  • Refactored file storage handling for sessions
  • Added new utility functions for testing and node backend detection

The following files were skipped due to too many changes: src/modules/sessions/batch.ts, src/modules/sessions/sessionSmartAccountClient.ts, src/modules/utils/Helper.ts, tests/modules/write.test.ts

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

github-actions bot commented May 20, 2024

size-limit report 📦

Path Size
core (esm) 53.95 KB (+0.48% 🔺)
core (cjs) 59.11 KB (+0.79% 🔺)
account (tree-shaking) 51.97 KB (+0.04% 🔺)
bundler (tree-shaking) 2.39 KB (0%)
paymaster (tree-shaking) 2.33 KB (0%)
modules (tree-shaking) 40.6 KB (+0.03% 🔺)

@joepegler joepegler force-pushed the feat/use_session_dx_tweak branch from e08367e to 6b440a5 Compare May 20, 2024 16:31
@joepegler joepegler changed the title chore: improve useSession dx chore: improve session dx May 23, 2024
} else {
if (!data) {
resolve(null)
nodeFs.readFile(
Copy link
Contributor

Choose a reason for hiding this comment

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

This will only work on backend, which is expected as this is for file storage. Is there any possibility of FE getting error because one of the files is using node-fs?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not unless the dev explicitly does something silly. By default localStorage only is used in the browser.

@joepegler joepegler force-pushed the feat/use_session_dx_tweak branch from 1691424 to fe38ad8 Compare May 23, 2024 19:00
@joepegler joepegler merged commit 5d4406e into develop May 23, 2024
6 checks passed
@joepegler joepegler deleted the feat/use_session_dx_tweak branch May 23, 2024 19:19
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.

2 participants