Page MenuHomePhabricator

[native] Set urlPrefix in Redux following successful registration
ClosedPublic

Authored by ashoat on Jun 13 2023, 10:20 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, May 13, 2:43 AM
Unknown Object (File)
Tue, May 7, 8:28 AM
Unknown Object (File)
Apr 5 2024, 3:59 AM
Unknown Object (File)
Apr 5 2024, 3:59 AM
Unknown Object (File)
Apr 5 2024, 3:59 AM
Unknown Object (File)
Apr 5 2024, 3:53 AM
Unknown Object (File)
Mar 4 2024, 3:17 AM
Unknown Object (File)
Mar 4 2024, 3:16 AM
Subscribers

Details

Summary

Before the successful registration, the previous diffs "hack" server calls to make sure they hit the user's selected keyserver.

Following the successful registration, we can set the urlPrefix in Redux so that all server calls hit the user's selected keyserver.

Depends on D8196

Test Plan

Tested in combination with the rest of the stack as follows:

  1. Override defaultURLPrefix in native/utils/url-utils.js to return some random string. This makes sure that the "default" of Ashoat's keyserver does not work, and makes it so the registration flow only works if the user selects a custom keyserver and all of the server calls in the registration flow use that custom keyserver
  2. Test the registration flow end-to-end for an Ethereum account
  3. Test the registration flow end-to-end for a username/password account
  4. Test the registration flow end-to-end for a username/password account with a custom avatar that requires an image upload
  5. Make sure that for all registrations, the correct avatar appears in the ChatThreadList when the RegistrationNavigator dismisses

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

native/account/registration/registration-server-call.js
156 ↗(On Diff #27691)

Once we get here, we are guaranteed a "successful" registration, in the sense that even if something avatar-related fails, we'll still log the user in when setDataLoadedActionType is dispatched

This revision is now accepted and ready to land.Jun 13 2023, 12:36 PM