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
Use storage for faster calls to isLoggedIn
on mobile
#689
Merged
romin-halltari
merged 19 commits into
master
from
rominhalltari-sc-91336-look-into-faster-calls-to-isloggedin-and
Jan 2, 2024
Merged
Use storage for faster calls to isLoggedIn
on mobile
#689
romin-halltari
merged 19 commits into
master
from
rominhalltari-sc-91336-look-into-faster-calls-to-isloggedin-and
Jan 2, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This pull request has been linked to Shortcut Story #91336: Look into faster calls to isLoggedIn and other methods that are called on app startup. |
Ariflo
reviewed
Dec 20, 2023
Ariflo
reviewed
Dec 20, 2023
packages/@magic-sdk/react-native-expo/src/react-native-sdk-base.ts
Outdated
Show resolved
Hide resolved
Ariflo
reviewed
Dec 20, 2023
packages/@magic-sdk/react-native-expo/src/react-native-sdk-base.ts
Outdated
Show resolved
Hide resolved
romin-halltari
force-pushed
the
rominhalltari-sc-91336-look-into-faster-calls-to-isloggedin-and
branch
from
December 20, 2023 20:37
cb5bf3c
to
eb11104
Compare
romin-halltari
force-pushed
the
rominhalltari-sc-91336-look-into-faster-calls-to-isloggedin-and
branch
from
December 20, 2023 21:56
eb11104
to
abb9059
Compare
…336-look-into-faster-calls-to-isloggedin-and
Ethella
reviewed
Dec 21, 2023
packages/@magic-sdk/react-native-bare/src/react-native-sdk-base.ts
Outdated
Show resolved
Hide resolved
Ethella
reviewed
Dec 21, 2023
packages/@magic-sdk/react-native-bare/src/react-native-sdk-base.ts
Outdated
Show resolved
Hide resolved
Ethella
reviewed
Dec 21, 2023
packages/@magic-sdk/react-native-bare/src/react-native-sdk-base.ts
Outdated
Show resolved
Hide resolved
This reverts commit 1c48262.
…336-look-into-faster-calls-to-isloggedin-and
romin-halltari
force-pushed
the
rominhalltari-sc-91336-look-into-faster-calls-to-isloggedin-and
branch
from
December 21, 2023 19:56
9108281
to
b24c775
Compare
Ethella
reviewed
Dec 21, 2023
Ethella
reviewed
Dec 21, 2023
Ethella
reviewed
Dec 21, 2023
On another note, I think we should always store the value in a JSON format to ensure scalability for the future. But I think it's an overkill for now, as we can always switch to a new key in the storage. |
…336-look-into-faster-calls-to-isloggedin-and
…336-look-into-faster-calls-to-isloggedin-and
Ethella
approved these changes
Jan 2, 2024
romin-halltari
deleted the
rominhalltari-sc-91336-look-into-faster-calls-to-isloggedin-and
branch
January 2, 2024 21:44
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📦 Pull Request
Significantly improves calls to
isLoggedIn
by keeping track of it by with the local storage. Check the screen recording for a demo. The code of the demo is on the Magic Lens repo, branchdemo/is-logged-in
.✅ Fixed Issues
#683
🚨 Test instructions
Please only add one label:
patch
: Bug Fix?minor
: New Feature?major
: Breaking Change?skip-release
: It's unnecessary to publish this change.Screen.Recording.2023-12-20.at.11.55.13.AM.mov
📦 Published PR as canary version:
Canary Versions
✨ Test out this PR locally via:
npm install @magic-ext/algorand@16.5.0-canary.689.7390316721.0 npm install @magic-ext/aptos@4.5.0-canary.689.7390316721.0 npm install @magic-ext/avalanche@16.5.0-canary.689.7390316721.0 npm install @magic-ext/bitcoin@16.5.0-canary.689.7390316721.0 npm install @magic-ext/conflux@14.5.0-canary.689.7390316721.0 npm install @magic-ext/cosmos@16.5.0-canary.689.7390316721.0 npm install @magic-ext/ed25519@12.5.0-canary.689.7390316721.0 npm install @magic-ext/flow@16.5.0-canary.689.7390316721.0 npm install @magic-ext/gdkms@4.5.0-canary.689.7390316721.0 npm install @magic-ext/harmony@16.5.0-canary.689.7390316721.0 npm install @magic-ext/icon@16.5.0-canary.689.7390316721.0 npm install @magic-ext/near@16.5.0-canary.689.7390316721.0 npm install @magic-ext/oauth@15.6.0-canary.689.7390316721.0 npm install @magic-ext/oidc@4.5.0-canary.689.7390316721.0 npm install @magic-ext/polkadot@16.5.0-canary.689.7390316721.0 npm install @magic-ext/react-native-bare-oauth@18.2.0-canary.689.7390316721.0 npm install @magic-ext/react-native-expo-oauth@18.2.0-canary.689.7390316721.0 npm install @magic-ext/solana@18.4.0-canary.689.7390316721.0 npm install @magic-ext/taquito@13.5.0-canary.689.7390316721.0 npm install @magic-ext/terra@13.5.0-canary.689.7390316721.0 npm install @magic-ext/tezos@16.5.0-canary.689.7390316721.0 npm install @magic-ext/webauthn@15.5.0-canary.689.7390316721.0 npm install @magic-ext/zilliqa@16.5.0-canary.689.7390316721.0 npm install @magic-sdk/commons@17.5.0-canary.689.7390316721.0 npm install @magic-sdk/pnp@15.6.0-canary.689.7390316721.0 npm install @magic-sdk/provider@21.5.0-canary.689.7390316721.0 npm install @magic-sdk/react-native-bare@22.5.0-canary.689.7390316721.0 npm install @magic-sdk/react-native-expo@22.5.0-canary.689.7390316721.0 npm install magic-sdk@21.5.0-canary.689.7390316721.0 # or yarn add @magic-ext/algorand@16.5.0-canary.689.7390316721.0 yarn add @magic-ext/aptos@4.5.0-canary.689.7390316721.0 yarn add @magic-ext/avalanche@16.5.0-canary.689.7390316721.0 yarn add @magic-ext/bitcoin@16.5.0-canary.689.7390316721.0 yarn add @magic-ext/conflux@14.5.0-canary.689.7390316721.0 yarn add @magic-ext/cosmos@16.5.0-canary.689.7390316721.0 yarn add @magic-ext/ed25519@12.5.0-canary.689.7390316721.0 yarn add @magic-ext/flow@16.5.0-canary.689.7390316721.0 yarn add @magic-ext/gdkms@4.5.0-canary.689.7390316721.0 yarn add @magic-ext/harmony@16.5.0-canary.689.7390316721.0 yarn add @magic-ext/icon@16.5.0-canary.689.7390316721.0 yarn add @magic-ext/near@16.5.0-canary.689.7390316721.0 yarn add @magic-ext/oauth@15.6.0-canary.689.7390316721.0 yarn add @magic-ext/oidc@4.5.0-canary.689.7390316721.0 yarn add @magic-ext/polkadot@16.5.0-canary.689.7390316721.0 yarn add @magic-ext/react-native-bare-oauth@18.2.0-canary.689.7390316721.0 yarn add @magic-ext/react-native-expo-oauth@18.2.0-canary.689.7390316721.0 yarn add @magic-ext/solana@18.4.0-canary.689.7390316721.0 yarn add @magic-ext/taquito@13.5.0-canary.689.7390316721.0 yarn add @magic-ext/terra@13.5.0-canary.689.7390316721.0 yarn add @magic-ext/tezos@16.5.0-canary.689.7390316721.0 yarn add @magic-ext/webauthn@15.5.0-canary.689.7390316721.0 yarn add @magic-ext/zilliqa@16.5.0-canary.689.7390316721.0 yarn add @magic-sdk/commons@17.5.0-canary.689.7390316721.0 yarn add @magic-sdk/pnp@15.6.0-canary.689.7390316721.0 yarn add @magic-sdk/provider@21.5.0-canary.689.7390316721.0 yarn add @magic-sdk/react-native-bare@22.5.0-canary.689.7390316721.0 yarn add @magic-sdk/react-native-expo@22.5.0-canary.689.7390316721.0 yarn add magic-sdk@21.5.0-canary.689.7390316721.0