Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3379008
D10896.id36440.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
D10896.id36440.diff
View Options
diff --git a/native/account/siwe-panel.react.js b/native/account/siwe-panel.react.js
--- a/native/account/siwe-panel.react.js
+++ b/native/account/siwe-panel.react.js
@@ -59,16 +59,6 @@
);
const { onClosing } = props;
- React.useEffect(() => {
- if (getSIWENonceCallFailed) {
- Alert.alert(
- 'Unknown error',
- 'Uhh... try again?',
- [{ text: 'OK', onPress: onClosing }],
- { cancelable: false },
- );
- }
- }, [getSIWENonceCallFailed, onClosing]);
const siweAuthCallLoading = useSelector(
state => siweAuthLoadingStatusSelector(state) === 'loading',
@@ -83,14 +73,24 @@
void dispatchActionPromise(
getSIWENonceActionTypes,
(async () => {
- const response = await getSIWENonceCall();
- setNonce(response);
+ try {
+ const response = await getSIWENonceCall();
+ setNonce(response);
+ } catch (e) {
+ Alert.alert(
+ 'Unknown error',
+ 'Uhh... try again?',
+ [{ text: 'OK', onPress: onClosing }],
+ { cancelable: false },
+ );
+ throw e;
+ }
})(),
);
const ed25519 = await getContentSigningKey();
setPrimaryIdentityPublicKey(ed25519);
})();
- }, [dispatchActionPromise, getSIWENonceCall]);
+ }, [dispatchActionPromise, getSIWENonceCall, onClosing]);
const [isLoading, setLoading] = React.useState(true);
const [walletConnectModalHeight, setWalletConnectModalHeight] =
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 28, 2:37 PM (20 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2594034
Default Alt Text
D10896.id36440.diff (1 KB)
Attached To
Mode
D10896: [native] move alert to effect where we call getSIWENonceCall()
Attached
Detach File
Event Timeline
Log In to Comment