Page MenuHomePhabricator

D11017.diff
No OneTemporary

D11017.diff

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

Mime Type
text/plain
Expires
Tue, Oct 1, 12:26 AM (21 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2208488
Default Alt Text
D11017.diff (2 KB)

Event Timeline