Page MenuHomePhabricator

D11911.id39857.diff
No OneTemporary

D11911.id39857.diff

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

Mime Type
text/plain
Expires
Sun, Dec 29, 11:55 AM (24 m, 40 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2732046
Default Alt Text
D11911.id39857.diff (1 KB)

Event Timeline