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

Dapp/SDK Retry Logic #51

Merged
merged 70 commits into from
Jul 7, 2023
Merged

Dapp/SDK Retry Logic #51

merged 70 commits into from
Jul 7, 2023

Conversation

kalashshah
Copy link
Member

@kalashshah kalashshah commented Jun 23, 2023

Includes

  • Migrate to Dapp/SDK logic for video
  • Migrate to chat APIs
  • Shift to delivery node API for push token
  • Audio/Video fixes
  • Refactor redux state
  • Wallet connect v2
  • Send/Accept Intent fixes
  • Login with private key pgp version fixes

@kalashshah kalashshah requested a review from MdTeach June 23, 2023 09:56
@github-actions
Copy link

All looks good. However, I noticed that there is a commented out code in index.js that should be removed to avoid confusion in the future.

@github-actions
Copy link

File: App.js

  • There are no apparent mistakes or typos in the code.
  • The logic of the code seems to be correct.

All looks good.

File: android/app/src/main/AndroidManifest.xml

  • There are no apparent mistakes or typos in the code.

All looks good.

File: index.js

  • There are no apparent mistakes or typos in the code.
  • The logic of the code seems to be correct.

All looks good.

File: metro.config.js

  • There are no apparent mistakes or typos in the code.

All looks good.

File: package.json

  • There are no apparent mistakes or typos in the code.

All looks good.

File: patches/react-native-simple-peer+0.1.5.patch

  • The patch seems to be commented out, so it's not being applied. Please make sure to uncomment and apply the patch if needed.

File: patches/simple-peer+9.11.1.patch

  • The patch seems to be commented out, so it's not being applied. Please make sure to uncomment and apply the patch if needed.

There are no other mistakes or typos in the code.

Overall, the code looks good.

@github-actions
Copy link

All looks good.

@github-actions
Copy link

All looks good.

@github-actions
Copy link

github-actions bot commented Jul 3, 2023

  • In App.js:
  1. Line 2: The import statement for AsyncStorage from '@react-native-async-storage/async-storage' is missing a semi-colon at the end.

  2. Line 15: The import statement for VideoCallContextProvider from 'src/contexts/VideoContext' is missing a semi-colon at the end.

  3. Line 21: The useEffect hook should have a return statement within it. Add a return statement with a function call to handleAppNotificationBadge.

  4. Lines 28-31: The event listener for 'answerCall' should be moved inside the useEffect hook to ensure it is properly registered and unregistered.

  5. Lines 35-36: The setCallAccepted function should be updated to set the value of isCallLocal instead of isCallAccepted.

  • In AndroidManifest.xml:
  1. Line 20: Remove the extra whitespace after the closing tag for the uses-permission element.
  • In index.js:
  1. Line 33: The useEffect hook should have a closing parenthesis after the returned JSX component.

  2. Line 34: The returned JSX component should be wrapped in a closing JSX tag.

  3. Line 35: The HeadlessCheck component should be wrapped in a closing JSX tag.

  4. Line 36: The HeadlessCheck component should be registered with AppRegistry before the closing parenthesis.

  • In metro.config.js:
  1. Line 9: The sourceExts array is missing a closing square bracket at the end.
  • In patches/react-native-simple-peer+0.1.5.patch:
  1. Lines 19-20: The commented out code should be removed.
  • In patches/simple-peer+9.11.1.patch:
  1. Lines 16-23: The commented out code should be removed.

That's it! All other files are either empty or do not contain any issues. All looks good.

@github-actions
Copy link

github-actions bot commented Jul 3, 2023

All looks good.

@github-actions
Copy link

github-actions bot commented Jul 6, 2023

In the file .env.prod.sample, .env.staging.sample, the variables INFURA_PROJECT_ID, INFURA_PROJECT_SECRET, YOUTUBE_API_KEY, APP_VERSION, SOCKET_KEY_PROD, PROD_ENV, WALLET_CONNECT_PROJECT_ID should be filled with appropriate values. Please make sure that these variables have correct values set.

In the file App.js, there is a missing closing bracket after the useEffect hook. Add a closing bracket before the return statement like this:

  useEffect(() => {
    // PUSH NOTIFICATIONS HANDLING
    Notify.instance.requestDeviceToken(true);
    // Listen to whether the token changes
    const onTokenRefresh = messaging().onTokenRefresh(token => {
      Notify.instance.saveDeviceToken(token, true); // true means it's a refresh
    });
    return () => {
      onTokenRefresh;
      handleAppNotificationBadge();
    };
  }, []);

In the file App.js, there is a typo in the useState hook. setCallAccepted is used to set the value of isCallLocal, but it should be used to set the value of isCallAccepted. Update the line to:

  const [isCallAccepted, setCallAccepted] = useState(false);

In the file App.js, before the return statement, there is a missing closing parenthesis for the handleAppNotificationBadge function. Add a closing parenthesis before the return statement like this:

    ...
    handleAppNotificationBadge();
  });

  ...

In the file android/app/src/main/AndroidManifest.xml, there is an extra whitespace character before the <!-- OPTIONAL PERMISSIONS, REMOVE WHATEVER YOU DO NOT NEED --> comment. Remove the whitespace character so that the comment is aligned with the previous line.

In the file index.js, there is a missing closing bracket for the HeadlessCheck component. Add a closing bracket before the return statement:

  ...
  return <App isCallAccepted={isCallAccepted} />;
}

In the file metro.config.js, there is a missing closing bracket for the resolver object. Add a closing bracket after the sourceExts property:

  ...
  resolver: {
    extraNodeModules,
    sourceExts: ['jsx', 'js', 'json', 'ts', 'tsx', 'mjs'],
  },
};

In the patch file patches/react-native-simple-peer+0.1.5.patch, there are commented lines that should not be left uncommented. Please uncomment the lines:

      this.destroy(errCode(new Error('Connection failed.'), 'ERR_CONNECTION_FAILURE'));
...
      // this.destroy(errCode(new Error('Connection failed.'), 'ERR_CONNECTION_FAILURE'));
      // if (iceConnectionState === 'failed') {
      //   this.destroy(errCode(new Error('Ice connection failed.'), 'ERR_ICE_CONNECTION_FAILURE'));
      // }
...
    // if (iceConnectionState === 'closed') {
    //   this.destroy(errCode(new Error('Ice connection closed.'), 'ERR_ICE_CONNECTION_CLOSED'));

In the patch file patches/simple-peer+9.11.1.patch, there are commented lines that should not be left uncommented. Please uncomment the lines:

      sender = this._pc.addTrack(track, stream)
+      // sender = this._pc.addStream(stream)

In the file src/helpers/JsonHelper.ts, there is a typo in the isJson function. isJson should be isJSON. Update the function name like this:

const JsonHelper = {
  isJSON: (str: string): boolean => {
    try {
      JSON.parse(str);
    } catch (e) {
      return false;
    }
    return true;
  },
};

export default JsonHelper;

Please review the other files as well to ensure there are no other mistakes or typos.

@github-actions
Copy link

github-actions bot commented Jul 7, 2023

All looks good.

@MdTeach MdTeach merged commit 7780c46 into main Jul 7, 2023
1 check passed
@kalashshah kalashshah deleted the dapp-retry-logic branch March 14, 2024 10:06
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