Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3365706
D11491.id38597.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
D11491.id38597.diff
View Options
diff --git a/landing/siwe.react.js b/landing/siwe.react.js
--- a/landing/siwe.react.js
+++ b/landing/siwe.react.js
@@ -88,27 +88,23 @@
const [wcModalOpen, setWCModalOpen] = React.useState(false);
- const prevConnectModalOpen = React.useRef(false);
+ const prevModalOpen = React.useRef(false);
const modalState = useModalState();
const closeTimeoutRef = React.useRef<?TimeoutID>();
const { connectModalOpen } = modalState;
+ const modalOpen = connectModalOpen || wcModalOpen;
React.useEffect(() => {
- if (
- !connectModalOpen &&
- !wcModalOpen &&
- prevConnectModalOpen.current &&
- !signer
- ) {
+ if (!modalOpen && prevModalOpen.current && !signer) {
closeTimeoutRef.current = setTimeout(
() => postMessageToNativeWebView({ type: 'siwe_closed' }),
- 250,
+ 500,
);
} else if (closeTimeoutRef.current) {
clearTimeout(closeTimeoutRef.current);
closeTimeoutRef.current = undefined;
}
- prevConnectModalOpen.current = connectModalOpen;
- }, [connectModalOpen, wcModalOpen, signer]);
+ prevModalOpen.current = modalOpen;
+ }, [modalOpen, signer]);
const onWalletConnectModalUpdate = React.useCallback(
(update: WalletConnectModalUpdate) => {
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
@@ -160,10 +160,17 @@
closeBottomSheet?.();
} else if (data.type === 'walletconnect_modal_update') {
const height = data.state === 'open' ? data.height : 0;
- setWalletConnectModalHeight(height);
+ if (!walletConnectModalHeight || height > 0) {
+ setWalletConnectModalHeight(height);
+ }
}
},
- [onSuccessfulWalletSignature, onClosing, closeBottomSheet],
+ [
+ onSuccessfulWalletSignature,
+ onClosing,
+ closeBottomSheet,
+ walletConnectModalHeight,
+ ],
);
const prevClosingRef = React.useRef<?boolean>();
React.useEffect(() => {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 26, 7:30 AM (21 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2582852
Default Alt Text
D11491.id38597.diff (2 KB)
Attached To
Mode
D11491: [native][landing] Fix up mobile SIWE flow after Wagmi and Rainbowkit updates
Attached
Detach File
Event Timeline
Log In to Comment