Skip to content

Commit

Permalink
[NO CHANGELOG] [Add Tokens Widget] Nuke changed your mind drawer (#2381)
Browse files Browse the repository at this point in the history
  • Loading branch information
mimi-imtbl authored Nov 12, 2024
1 parent ca12bd3 commit 0e349bd
Showing 1 changed file with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import {
useProvidersContext,
} from '../../context/providers-context/ProvidersContext';
import { UnableToConnectDrawer } from '../UnableToConnectDrawer/UnableToConnectDrawer';
import { ChangedYourMindDrawer } from '../ChangedYourMindDrawer/ChangedYourMindDrawer';
import {
connectEIP6963Provider,
ConnectEIP6963ProviderError,
Expand Down Expand Up @@ -70,7 +69,6 @@ export function ConnectWalletDrawer({
const prevWalletChangeEvent = useRef<WalletChangeEvent | undefined>();

const [showUnableToConnectDrawer, setShowUnableToConnectDrawer] = useState(false);
const [showChangedMindDrawer, setShowChangedMindDrawer] = useState(false);
const [showEOAWarningDrawer, setShowEOAWarningDrawer] = useState(false);

const setProviderInContext = async (
Expand Down Expand Up @@ -155,9 +153,6 @@ export function ConnectWalletDrawer({
} catch (error: ConnectEIP6963ProviderError | any) {
let errorType = error.message;
switch (error.message) {
case ConnectEIP6963ProviderError.USER_REJECTED_REQUEST_ERROR:
setShowChangedMindDrawer(true);
break;
case ConnectEIP6963ProviderError.SANCTIONED_ADDRESS:
case ConnectEIP6963ProviderError.CONNECT_ERROR:
setShowUnableToConnectDrawer(true);
Expand Down Expand Up @@ -194,11 +189,6 @@ export function ConnectWalletDrawer({
}
};

const handleCloseChangedMindDrawer = () => {
retrySelectedWallet();
setShowChangedMindDrawer(false);
};

const handleProceedEOA = () => {
retrySelectedWallet();
setShowEOAWarningDrawer(false);
Expand Down Expand Up @@ -230,12 +220,6 @@ export function ConnectWalletDrawer({
onCloseDrawer={() => setShowUnableToConnectDrawer(false)}
onTryAgain={() => setShowUnableToConnectDrawer(false)}
/>
<ChangedYourMindDrawer
visible={showChangedMindDrawer}
checkout={checkout!}
onCloseDrawer={() => setShowChangedMindDrawer(false)}
onTryAgain={handleCloseChangedMindDrawer}
/>
<EOAWarningDrawer
visible={showEOAWarningDrawer}
onProceedClick={handleProceedEOA}
Expand Down

0 comments on commit 0e349bd

Please sign in to comment.