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 @@ -437,10 +437,23 @@ const identityClient = client?.identityClient; invariant(identityClient, 'Identity client should be set'); if (!identityClient.registerPasswordUser) { - throw new Error('Register user method unimplemented'); + throw new Error('Register password user method unimplemented'); } return identityClient.registerPasswordUser; } +function useIdentityWalletRegister(): ( + walletAddress: string, + siweMessage: string, + siweSignature: string, +) => Promise { + const client = React.useContext(IdentityClientContext); + const identityClient = client?.identityClient; + invariant(identityClient, 'Identity client should be set'); + if (!identityClient.registerWalletUser) { + throw new Error('Register wallet user method unimplemented'); + } + return identityClient.registerWalletUser; +} const identityGenerateNonceActionTypes = Object.freeze({ started: 'IDENTITY_GENERATE_NONCE_STARTED', @@ -848,6 +861,7 @@ useKeyserverAuth, identityRegisterActionTypes, useIdentityPasswordRegister, + useIdentityWalletRegister, identityGenerateNonceActionTypes, useIdentityGenerateNonce, };