diff --git a/src/components/PushSnap/PushSnapConfigureModal.tsx b/src/components/PushSnap/PushSnapConfigureModal.tsx index 084d43f4fa..c81590fdbe 100644 --- a/src/components/PushSnap/PushSnapConfigureModal.tsx +++ b/src/components/PushSnap/PushSnapConfigureModal.tsx @@ -44,7 +44,6 @@ const PushSnapConfigureModal = () => { }, }, }); - console.log('res', res); setToggleStatus(res); })(); }, [toggleStatus]); @@ -67,7 +66,6 @@ const PushSnapConfigureModal = () => { } const addWalletAddresses = async () => { - console.log('searchedUser', searchedUser); const signatureResult = await getSignature(1); if (signatureResult) { if (searchedUser) { @@ -81,7 +79,8 @@ const PushSnapConfigureModal = () => { }, }, }); - console.log('Added', searchedUser); + setSearchedUser(''); + getWalletAddresses(); } } else { console.log('Signature Validation Failed'); @@ -107,6 +106,7 @@ const PushSnapConfigureModal = () => { const removeWalletAddresses = async (walletSelected: string) => { const signatureResult = await getSignature(2); + console.log("Ran",signatureResult) if (signatureResult) { if (walletSelected) { await window.ethereum?.request({ @@ -119,6 +119,7 @@ const PushSnapConfigureModal = () => { }, }, }); + getWalletAddresses(); } } else { console.log('Signature Validation Failed'); @@ -133,7 +134,6 @@ const PushSnapConfigureModal = () => { request: { method: 'pushproto_getaddresses' }, }, }); - console.log('result', result); setAddresses(result); } @@ -151,8 +151,6 @@ const PushSnapConfigureModal = () => { return ( - - { {addresses?.map((wallet) => ( {shortenText(wallet, 8)} - handleWalletSelect(wallet)} color={theme.default.color} /> + handleWalletSelect(wallet)} color={theme.default.color} /> {walletSelected === wallet && - removeWalletAddresses(walletSelected)}>Remove + removeWalletAddresses(walletSelected)}>Remove } @@ -434,12 +432,14 @@ const AddressesSubContainer = styled(ItemHV2)` const MoreOptions = styled(AiOutlineMore)` width:24px; height:24px; + cursor:pointer; ` const RemoveDiv = styled(ItemHV2)` border-radius: 12px; border: 1px solid #BAC4D6; background: #FFF; + cursor: pointer; box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.05); padding: 8px 12px 8px 8px; align-items: center; diff --git a/src/modules/snap/SnapModule.tsx b/src/modules/snap/SnapModule.tsx index f525e7ef1d..37abade4dd 100644 --- a/src/modules/snap/SnapModule.tsx +++ b/src/modules/snap/SnapModule.tsx @@ -38,10 +38,13 @@ const SnapModule = () => { const { account, provider } = useAccount(); + const theme = useTheme(); + const navigate = useNavigate(); + useEffect(() => { getInstalledSnaps(); getWalletAddresses(); - }, [account, walletConnected]); + }, [account, walletConnected, snapInstalled]); async function getInstalledSnaps() { const installedSnaps = await window.ethereum.request({ @@ -65,10 +68,9 @@ const SnapModule = () => { }, }); - console.log(account); - console.log(walletConnected); if (result.includes(account)) { setAddedAddress(true); + setWalletConnected(true); } else { setAddedAddress(false); } @@ -142,9 +144,6 @@ const SnapModule = () => { setSnapState(3); showMetamaskPushSnap(); }; - - const theme = useTheme(); - const navigate = useNavigate(); return (