Page MenuHomePhabricator

D10896.id36440.diff
No OneTemporary

D10896.id36440.diff

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

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)

Event Timeline