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: Allow implementers of view-controller to set if it's connected to the internet, and reject requests when isConnectedToInternet is false #673

Conversation

romin-halltari
Copy link
Contributor

@romin-halltari romin-halltari commented Nov 28, 2023

📦 Pull Request

Fix: Allow classes that extend view-controller to set if it's connected to the internet, and reject requests when isConnectedToInternet is false.

On mobile, it takes a while for the connectivity to the overlay to be established. If a method like isLoggedIn is called before that (i.e. on app start-up), it would reject it, which is not ideal. This fix allows you to call methods like isLoggedIn even before the connection is established, and wait for a response.

✅ Fixed Issues

🚨 Test instructions

[Describe any additional context required to test the PR/feature/bug fix.]

⚠️ Don't forget to add a semver label!

Please only add one label:

  • patch: Bug Fix?
  • minor: New Feature?
  • major: Breaking Change?
  • skip-release: It's unnecessary to publish this change.
📦 Published PR as canary version: Canary Versions

✨ Test out this PR locally via:

npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-ext/[email protected]
npm install @magic-sdk/[email protected]
npm install @magic-sdk/[email protected]
npm install @magic-sdk/[email protected]
npm install @magic-sdk/[email protected]
npm install @magic-sdk/[email protected]
npm install [email protected]
# or 
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-ext/[email protected]
yarn add @magic-sdk/[email protected]
yarn add @magic-sdk/[email protected]
yarn add @magic-sdk/[email protected]
yarn add @magic-sdk/[email protected]
yarn add @magic-sdk/[email protected]
yarn add [email protected]

@romin-halltari romin-halltari added the patch Increment the patch version when merged label Nov 28, 2023
@romin-halltari romin-halltari self-assigned this Nov 28, 2023
Copy link

This pull request has been linked to Shortcut Story #90966: Fix connectivity issues for react native SDKs.

@romin-halltari romin-halltari force-pushed the rominhalltari-sc-90966-fix-connectivity-issues-for-react-native branch from bb4735b to 8cf80e8 Compare November 28, 2023 19:28
Ariflo

This comment was marked as outdated.

Ariflo

This comment was marked as duplicate.

Copy link
Contributor

@Ariflo Ariflo left a comment

Choose a reason for hiding this comment

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

Don't forget to add this is ready check back. You can decide to keep the name checkIsReadyForRequest or return it back to this.ready . 👍

@romin-halltari romin-halltari force-pushed the rominhalltari-sc-90966-fix-connectivity-issues-for-react-native branch from 8cf80e8 to 253ff70 Compare November 28, 2023 19:48
Copy link
Contributor

@Ariflo Ariflo left a comment

Choose a reason for hiding this comment

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

lgtm

@romin-halltari romin-halltari added this pull request to the merge queue Nov 28, 2023
Merged via the queue into master with commit 1cac057 Nov 28, 2023
4 checks passed
@romin-halltari romin-halltari deleted the rominhalltari-sc-90966-fix-connectivity-issues-for-react-native branch November 28, 2023 20:02
@Ariflo Ariflo added the released This issue/pull request has been released. label Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MagicSDK stopped working since yesterday: MODAL_NOT_READY or network timeout
2 participants