Page MenuHomePhabricator

D11948.id39953.diff
No OneTemporary

D11948.id39953.diff

diff --git a/landing/siwe.react.js b/landing/siwe.react.js
--- a/landing/siwe.react.js
+++ b/landing/siwe.react.js
@@ -4,7 +4,6 @@
useConnectModal,
RainbowKitProvider,
darkTheme,
- useModalState,
} from '@rainbow-me/rainbowkit';
import '@rainbow-me/rainbowkit/styles.css';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
@@ -86,7 +85,7 @@
siweMessageType,
]);
- const { openConnectModal } = useConnectModal();
+ const { openConnectModal, connectModalOpen } = useConnectModal();
const hasNonce = siweNonce !== null && siweNonce !== undefined;
React.useEffect(() => {
if (hasNonce && openConnectModal) {
@@ -97,19 +96,10 @@
const [wcModalOpen, setWCModalOpen] = React.useState(false);
const prevModalOpen = React.useRef(false);
- const modalState = useModalState();
- const closeTimeoutRef = React.useRef<?TimeoutID>();
- const { connectModalOpen } = modalState;
const modalOpen = connectModalOpen || wcModalOpen;
React.useEffect(() => {
if (!modalOpen && prevModalOpen.current && !signer) {
- closeTimeoutRef.current = setTimeout(
- () => postMessageToNativeWebView({ type: 'siwe_closed' }),
- 500,
- );
- } else if (closeTimeoutRef.current) {
- clearTimeout(closeTimeoutRef.current);
- closeTimeoutRef.current = undefined;
+ postMessageToNativeWebView({ type: 'siwe_closed' });
}
prevModalOpen.current = modalOpen;
}, [modalOpen, signer]);
diff --git a/patches/@rainbow-me+rainbowkit+2.0.4.patch b/patches/@rainbow-me+rainbowkit+2.0.4.patch
--- a/patches/@rainbow-me+rainbowkit+2.0.4.patch
+++ b/patches/@rainbow-me+rainbowkit+2.0.4.patch
@@ -1,12 +1,11 @@
diff --git a/node_modules/@rainbow-me/rainbowkit/dist/index.js b/node_modules/@rainbow-me/rainbowkit/dist/index.js
-index 3d856c7..95d5a23 100644
+index 3d856c7..7653c4f 100644
--- a/node_modules/@rainbow-me/rainbowkit/dist/index.js
+++ b/node_modules/@rainbow-me/rainbowkit/dist/index.js
-@@ -6518,5 +6518,7 @@ export {
+@@ -6518,5 +6518,6 @@ export {
useAccountModal,
useAddRecentTransaction,
useChainModal,
-+ useModalState,
+ emojiAvatarForAddress,
useConnectModal
};

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 17, 11:49 AM (21 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2523661
Default Alt Text
D11948.id39953.diff (2 KB)

Event Timeline