From a5157d1e476a7db38f5943f6572f68c5069d5f8c Mon Sep 17 00:00:00 2001 From: gerardhalo Date: Tue, 20 Jan 2026 15:39:06 +0800 Subject: [PATCH] refactor: Remove unused token detection logic in MobileWallet component - Eliminated the detectTokenPocket function and its associated useEffect, streamlining the MobileWallet component by removing unnecessary code related to TokenPocket detection. --- src/libs/wallets/tron/provider.tsx | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/libs/wallets/tron/provider.tsx b/src/libs/wallets/tron/provider.tsx index 7d79fa9e..5e507cde 100644 --- a/src/libs/wallets/tron/provider.tsx +++ b/src/libs/wallets/tron/provider.tsx @@ -216,18 +216,5 @@ const MobileWallet = () => { }); }); - const detectTokenPocket = () => { - const ua = window?.navigator?.userAgent?.toLowerCase?.(); - const isTokenPocket = (window?.tronLink as any)?.isTokenPocket ?? ua?.indexOf?.("tokenpocket") > -1; - - if (window && isTokenPocket) { - window.location.replace("https://tron.stableflow.ai"); - } - }; - - useEffect(() => { - detectTokenPocket(); - }, []); - return null; };