Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3357806
D11494.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D11494.diff
View Options
diff --git a/lib/components/fid-provider.react.js b/lib/components/fid-provider.react.js
--- a/lib/components/fid-provider.react.js
+++ b/lib/components/fid-provider.react.js
@@ -3,7 +3,7 @@
import * as React from 'react';
type FIDContextType = {
- +setFID: string => void,
+ +setFID: (?string) => void,
+fid: ?string,
};
diff --git a/native/account/registration/registration-server-call.js b/native/account/registration/registration-server-call.js
--- a/native/account/registration/registration-server-call.js
+++ b/native/account/registration/registration-server-call.js
@@ -1,5 +1,6 @@
// @flow
+import invariant from 'invariant';
import * as React from 'react';
import { setDataLoadedActionType } from 'lib/actions/client-db-store-actions.js';
@@ -9,6 +10,7 @@
useIdentityPasswordRegister,
identityRegisterActionTypes,
} from 'lib/actions/user-actions.js';
+import { FIDContext } from 'lib/components/fid-provider.react.js';
import type { LogInStartingPayload } from 'lib/types/account-types.js';
import { useLegacyAshoatKeyserverCall } from 'lib/utils/action-utils.js';
import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
@@ -73,6 +75,10 @@
const callKeyserverRegister = useLegacyAshoatKeyserverCall(keyserverRegister);
const callIdentityPasswordRegister = useIdentityPasswordRegister();
+ const fidContext = React.useContext(FIDContext);
+ invariant(fidContext, 'FIDContext is missing');
+ const { setFID } = fidContext;
+
const identityRegisterUsernameAccount = React.useCallback(
async (accountSelection: UsernameAccountSelection) => {
const identityRegisterPromise = (async () => {
@@ -191,7 +197,8 @@
if (currentStep.step !== 'inactive') {
return;
}
- const { accountSelection, avatarData, keyserverURL } = input;
+ const { accountSelection, avatarData, keyserverURL, farcasterID } =
+ input;
if (
accountSelection.accountType === 'username' &&
!usingCommServicesAccessToken
@@ -233,6 +240,7 @@
type: setURLPrefix,
payload: keyserverURL,
});
+ setFID(farcasterID);
setCurrentStep({
step: 'waiting_for_registration_call',
avatarData,
@@ -251,6 +259,7 @@
legacySiweServerCall,
dispatch,
identityWalletRegisterCall,
+ setFID,
],
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 1:40 AM (21 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2577953
Default Alt Text
D11494.diff (2 KB)
Attached To
Mode
D11494: [lib][native] Update useRegistrationServerCall to set FID in FIDContext
Attached
Detach File
Event Timeline
Log In to Comment