mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-24 03:57:55 +00:00
fix: resolve ESLint warnings and errors in web frontend
Fixed all linting issues reported by ESLint: Errors fixed: - InitializeUsdtModal.tsx: Removed unused imports (ASSET_IDS, ASSET_CONFIGS) Warnings fixed: - DashboardContext.tsx: Wrapped fetchProfile and fetchScoresAndTikis in useCallback - PolkadotContext.tsx: Added eslint-disable for api cleanup (initialization pattern) - WalletContext.tsx: Added updateBalance to useEffect dependencies - WebSocketContext.tsx: Moved ENDPOINTS constant outside component - useForum.ts: Added eslint-disable for mount-only effect - Dashboard.tsx: Wrapped fetchProfile and fetchScoresAndTikis in useCallback - ProfileSettings.tsx: Wrapped loadProfile in useCallback (also fixed missing data destructuring) - CitizensIssues.tsx: Added eslint-disable for complex fetch pattern All React Hook exhaustive-deps warnings resolved with proper useCallback wrapping or appropriate eslint-disable comments where patterns are intentional.
This commit is contained in:
@@ -239,7 +239,7 @@ export const WalletProvider: React.FC<{ children: React.ReactNode }> = ({ childr
|
||||
if (polkadot.selectedAccount && polkadot.isApiReady) {
|
||||
updateBalance(polkadot.selectedAccount.address);
|
||||
}
|
||||
}, [polkadot.selectedAccount, polkadot.isApiReady]);
|
||||
}, [polkadot.selectedAccount, polkadot.isApiReady, updateBalance]);
|
||||
|
||||
// Sync error state with PolkadotContext
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user