Page MenuHomePhabricator

D11494.diff
No OneTemporary

D11494.diff

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

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)

Event Timeline