Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3490118
D6738.id22611.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
D6738.id22611.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
@@ -39,6 +39,7 @@
const { chains, provider } = configureWagmiChains(process.env.COMM_ALCHEMY_KEY);
const connectors = connectorsForWallets([
{
+ groupName: 'Recommended',
wallets: [
injectedWallet({ chains }),
rainbowWallet({ chains }),
@@ -94,10 +95,17 @@
const prevConnectModalOpen = React.useRef(false);
const modalState = useModalState();
+ const closeTimeoutRef = React.useRef();
const { connectModalOpen } = modalState;
React.useEffect(() => {
if (!connectModalOpen && prevConnectModalOpen.current && !signer) {
- postMessageToNativeWebView({ type: 'siwe_closed' });
+ closeTimeoutRef.current = setTimeout(
+ () => postMessageToNativeWebView({ type: 'siwe_closed' }),
+ 50,
+ );
+ } else if (closeTimeoutRef.current) {
+ clearTimeout(closeTimeoutRef.current);
+ closeTimeoutRef.current = undefined;
}
prevConnectModalOpen.current = connectModalOpen;
}, [connectModalOpen, signer]);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 3:04 PM (21 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2677283
Default Alt Text
D6738.id22611.diff (1 KB)
Attached To
Mode
D6738: [landing] Fix SIWE after RainbowKit/Wagmi update
Attached
Detach File
Event Timeline
Log In to Comment