Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3565253
D11017.id37468.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D11017.id37468.diff
View Options
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
@@ -35,7 +35,10 @@
} from '../../utils/alert-messages.js';
import Alert from '../../utils/alert.js';
import { setNativeCredentials } from '../native-credentials.js';
-import { useLegacySIWEServerCall } from '../siwe-hooks.js';
+import {
+ useLegacySIWEServerCall,
+ useIdentityWalletRegisterCall,
+} from '../siwe-hooks.js';
// We can't just do everything in one async callback, since the server calls
// would get bound to Redux state from before the registration. The registration
@@ -177,6 +180,7 @@
);
const legacySiweServerCall = useLegacySIWEServerCall();
+ const identityWalletRegisterCall = useIdentityWalletRegisterCall();
const dispatch = useDispatch();
const returnedFunc = React.useCallback(
(input: RegistrationServerCallInput) =>
@@ -198,7 +202,7 @@
);
} else if (accountSelection.accountType === 'username') {
await identityRegisterUsernameAccount(accountSelection);
- } else {
+ } else if (!usingCommServicesAccessToken) {
try {
await legacySiweServerCall(accountSelection, {
urlPrefixOverride: keyserverURL,
@@ -210,6 +214,20 @@
);
throw e;
}
+ } else {
+ try {
+ await identityWalletRegisterCall({
+ address: accountSelection.address,
+ message: accountSelection.message,
+ signature: accountSelection.signature,
+ });
+ } catch (e) {
+ Alert.alert(
+ UnknownErrorAlertDetails.title,
+ UnknownErrorAlertDetails.message,
+ );
+ throw e;
+ }
}
dispatch({
type: setURLPrefix,
@@ -232,6 +250,7 @@
identityRegisterUsernameAccount,
legacySiweServerCall,
dispatch,
+ identityWalletRegisterCall,
],
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 28, 4:54 PM (8 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2722699
Default Alt Text
D11017.id37468.diff (2 KB)
Attached To
Mode
D11017: [native] use identity wallet registration from final step of new registration workflow
Attached
Detach File
Event Timeline
Log In to Comment