mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-22 02:07:55 +00:00
fix: resolve remaining mobile app lint warnings
This commit is contained in:
@@ -155,7 +155,7 @@ const DashboardScreen: React.FC<DashboardScreenProps> = () => {
|
||||
const status = await getKycStatus(api, selectedAccount.address);
|
||||
setKycStatus(status);
|
||||
|
||||
if (__DEV__) console.log('[Dashboard] Blockchain data fetched:', { tikis: userTikis, scores: allScores, kycStatus: status });
|
||||
if (__DEV__) console.warn('[Dashboard] Blockchain data fetched:', { tikis: userTikis, scores: allScores, kycStatus: status });
|
||||
} catch (error) {
|
||||
if (__DEV__) console.error('[Dashboard] Error fetching blockchain data:', error);
|
||||
} finally {
|
||||
@@ -171,6 +171,7 @@ const DashboardScreen: React.FC<DashboardScreenProps> = () => {
|
||||
if (selectedAccount && api && isApiReady) {
|
||||
fetchBlockchainData();
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [fetchBlockchainData]);
|
||||
|
||||
// Check if user is a visitor (default when no blockchain wallet or no tikis)
|
||||
|
||||
@@ -96,6 +96,7 @@ const EditProfileScreen: React.FC = () => {
|
||||
|
||||
useEffect(() => {
|
||||
fetchProfile();
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
const fetchProfile = async () => {
|
||||
|
||||
@@ -72,6 +72,7 @@ const P2PPlatformScreen: React.FC = () => {
|
||||
// Refresh ads every 30 seconds
|
||||
const interval = setInterval(fetchAds, 30000);
|
||||
return () => clearInterval(interval);
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [selectedTab]); // Re-fetch when tab changes
|
||||
|
||||
const handleRefresh = () => {
|
||||
|
||||
@@ -163,6 +163,7 @@ const PoolBrowserScreen: React.FC = () => {
|
||||
// Refresh pools every 10 seconds
|
||||
const interval = setInterval(fetchPools, 10000);
|
||||
return () => clearInterval(interval);
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [api, isApiReady]);
|
||||
|
||||
const handleRefresh = () => {
|
||||
|
||||
@@ -101,6 +101,7 @@ const ProfileScreen: React.FC = () => {
|
||||
useFocusEffect(
|
||||
useCallback(() => {
|
||||
fetchProfileData();
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [user])
|
||||
);
|
||||
|
||||
|
||||
@@ -320,6 +320,7 @@ const WalletScreen: React.FC = () => {
|
||||
unsubscribe();
|
||||
}
|
||||
};
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [api, isApiReady, selectedAccount]);
|
||||
|
||||
// Fetch all tokens from blockchain (Nova Wallet style)
|
||||
@@ -520,6 +521,7 @@ const WalletScreen: React.FC = () => {
|
||||
const timer = setTimeout(estimateFee, 500); // Debounce 500ms
|
||||
return () => clearTimeout(timer);
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [recipientAddress, sendAmount, sendModalVisible, selectedToken]);
|
||||
|
||||
const handleConfirmSend = async () => {
|
||||
|
||||
Reference in New Issue
Block a user