Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3352443
D8088.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D8088.diff
View Options
diff --git a/native/account/registration/avatar-selection.react.js b/native/account/registration/avatar-selection.react.js
--- a/native/account/registration/avatar-selection.react.js
+++ b/native/account/registration/avatar-selection.react.js
@@ -4,19 +4,16 @@
import * as React from 'react';
import { Text, View } from 'react-native';
-import type {
- UpdateUserAvatarRequest,
- ClientAvatar,
-} from 'lib/types/avatar-types.js';
-import type { NativeMediaSelection } from 'lib/types/media-types.js';
-import type { SIWEResult } from 'lib/types/siwe-types.js';
-
import RegistrationButtonContainer from './registration-button-container.react.js';
import RegistrationButton from './registration-button.react.js';
import RegistrationContainer from './registration-container.react.js';
import RegistrationContentContainer from './registration-content-container.react.js';
import type { RegistrationNavigationProp } from './registration-navigator.react.js';
-import type { CoolOrNerdMode } from './registration-types.js';
+import type {
+ CoolOrNerdMode,
+ AccountSelection,
+ AvatarData,
+} from './registration-types.js';
import {
EditUserAvatarContext,
type UserAvatarSelection,
@@ -25,38 +22,14 @@
import type { NavigationRoute } from '../../navigation/route-names.js';
import { useStyles } from '../../themes/colors.js';
-type EthereumAccountSelections = {
- +accountType: 'ethereum',
- ...SIWEResult,
- +avatarURI: ?string,
-};
-
-type UsernameAccountSelections = {
- +accountType: 'username',
- +username: string,
- +password: string,
-};
-
export type AvatarSelectionParams = {
+userSelections: {
+coolOrNerdMode: CoolOrNerdMode,
+keyserverUsername: string,
- +accountSelections: EthereumAccountSelections | UsernameAccountSelections,
+ +accountSelections: AccountSelection,
},
};
-type AvatarData =
- | {
- +needsUpload: true,
- +mediaSelection: NativeMediaSelection,
- +clientAvatar: ClientAvatar,
- }
- | {
- +needsUpload: false,
- +updateUserAvatarRequest: UpdateUserAvatarRequest,
- +clientAvatar: ClientAvatar,
- };
-
const ensDefaultSelection = {
needsUpload: false,
updateUserAvatarRequest: { type: 'ens' },
diff --git a/native/account/registration/registration-types.js b/native/account/registration/registration-types.js
--- a/native/account/registration/registration-types.js
+++ b/native/account/registration/registration-types.js
@@ -1,3 +1,38 @@
// @flow
+import type {
+ UpdateUserAvatarRequest,
+ ClientAvatar,
+} from 'lib/types/avatar-types.js';
+import type { NativeMediaSelection } from 'lib/types/media-types.js';
+import type { SIWEResult } from 'lib/types/siwe-types.js';
+
export type CoolOrNerdMode = 'cool' | 'nerd';
+
+export type EthereumAccountSelection = {
+ +accountType: 'ethereum',
+ ...SIWEResult,
+ +avatarURI: ?string,
+};
+
+export type UsernameAccountSelection = {
+ +accountType: 'username',
+ +username: string,
+ +password: string,
+};
+
+export type AccountSelection =
+ | EthereumAccountSelection
+ | UsernameAccountSelection;
+
+export type AvatarData =
+ | {
+ +needsUpload: true,
+ +mediaSelection: NativeMediaSelection,
+ +clientAvatar: ClientAvatar,
+ }
+ | {
+ +needsUpload: false,
+ +updateUserAvatarRequest: UpdateUserAvatarRequest,
+ +clientAvatar: ClientAvatar,
+ };
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 5:57 AM (20 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2574205
Default Alt Text
D8088.diff (3 KB)
Attached To
Mode
D8088: [native] Move some types from avatar-selection.react.js to registration-types.js
Attached
Detach File
Event Timeline
Log In to Comment