   if (window.history && window.history.replaceState) {
                        const newUrl = window.location.protocol + "//" + window.location.host + window.location.pathname;
                        window.history.replaceState({}, document.title, newUrl);
                    }
                    return;
                }
            }

            // Check for existing wallet in localStorage
            const savedWallet = localStorage.getItem('zhtp_wallet');
            if (savedWallet) {
             