Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3572354
D11911.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D11911.id.diff
View Options
diff --git a/lib/actions/user-actions.js b/lib/actions/user-actions.js
--- a/lib/actions/user-actions.js
+++ b/lib/actions/user-actions.js
@@ -549,6 +549,20 @@
}
return identityClient.registerPasswordUser;
}
+function useIdentityPasswordRegisterReserved(): (
+ usename: string,
+ password: string,
+ keyserverMessage: string,
+ keyserverSignature: string,
+) => Promise<IdentityAuthResult> {
+ const client = React.useContext(IdentityClientContext);
+ const identityClient = client?.identityClient;
+ invariant(identityClient, 'Identity client should be set');
+ if (!identityClient.registerReservedPasswordUser) {
+ throw new Error('Register password user method unimplemented');
+ }
+ return identityClient.registerReservedPasswordUser;
+}
function useIdentityWalletRegister(): (
walletAddress: string,
siweMessage: string,
@@ -563,6 +577,21 @@
}
return identityClient.registerWalletUser;
}
+function useIdentityWalletRegisterReserved(): (
+ walletAddress: string,
+ siweMessage: string,
+ siweSignature: string,
+ keyserverMessage: string,
+ keyserverSignature: string,
+) => Promise<IdentityAuthResult> {
+ const client = React.useContext(IdentityClientContext);
+ const identityClient = client?.identityClient;
+ invariant(identityClient, 'Identity client should be set');
+ if (!identityClient.registerReservedWalletUser) {
+ throw new Error('Register wallet user method unimplemented');
+ }
+ return identityClient.registerReservedWalletUser;
+}
const identityGenerateNonceActionTypes = Object.freeze({
started: 'IDENTITY_GENERATE_NONCE_STARTED',
@@ -980,7 +1009,9 @@
keyserverAuth as keyserverAuthRawAction,
identityRegisterActionTypes,
useIdentityPasswordRegister,
+ useIdentityPasswordRegisterReserved,
useIdentityWalletRegister,
+ useIdentityWalletRegisterReserved,
identityGenerateNonceActionTypes,
useIdentityGenerateNonce,
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 29, 11:55 AM (4 m, 57 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2732046
Default Alt Text
D11911.id.diff (1 KB)
Attached To
Mode
D11911: [lib] hooks for reserved registration
Attached
Detach File
Event Timeline
Log In to Comment