diff --git a/packages/extension-koni-ui/src/components/Modal/WalletConnect/ConnectWalletSuccessModal.tsx b/packages/extension-koni-ui/src/components/Modal/WalletConnect/ConnectWalletSuccessModal.tsx index f33fa6cfb6..8438c09bcf 100644 --- a/packages/extension-koni-ui/src/components/Modal/WalletConnect/ConnectWalletSuccessModal.tsx +++ b/packages/extension-koni-ui/src/components/Modal/WalletConnect/ConnectWalletSuccessModal.tsx @@ -26,11 +26,17 @@ function Component (props: Props): React.ReactElement { const { inactiveModal } = useContext(ModalContext); - const onClose = useCallback(() => { + const onOk = useCallback(() => { inactiveModal(modalId); callback(address); }, [address, callback, inactiveModal]); + const onClose = useCallback(() => { + inactiveModal(modalId); + // eslint-disable-next-line node/no-callback-literal + callback(''); + }, [callback, inactiveModal]); + const modalFooter = useMemo(() => { return ( <> @@ -43,7 +49,7 @@ function Component (props: Props): React.ReactElement { weight='fill' /> } - onClick={onClose} + onClick={onOk} shape={'round'} size={'sm'} > @@ -51,7 +57,7 @@ function Component (props: Props): React.ReactElement { ); - }, [onClose, t]); + }, [onOk, t]); return (