Skip to content

Commit

Permalink
fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
steezeburger committed Jan 11, 2025
1 parent b9f9b42 commit cdfba73
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 17 deletions.
2 changes: 1 addition & 1 deletion apps/web/app/components/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import ConnectWalletsButton from "../ConnectWalletsButton/ConnectWalletsButton";
function Navbar() {
const [isMobileMenuActive, setIsMobileMenuActive] = useState(false);

const onHamburgerClick = (_: React.SyntheticEvent<HTMLButtonElement>) => {
const onHamburgerClick = () => {
setIsMobileMenuActive((prev) => !prev);
};

Expand Down
3 changes: 1 addition & 2 deletions apps/web/app/components/WithdrawCard/WithdrawCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,12 @@ export default function WithdrawCard(): React.ReactElement {
}, [connectCosmosWallet]);

// ensure evm wallet connection when selected EVM chain changes
/* biome-ignore lint/correctness/useExhaustiveDependencies: */
useEffect(() => {
if (!selectedEvmChain) {
return;
}
connectEvmWallet();
}, [selectedEvmChain]);
}, [connectEvmWallet, selectedEvmChain]);

// ensure cosmos wallet connection when selected ibc chain changes
useEffect(() => {
Expand Down
4 changes: 2 additions & 2 deletions apps/web/app/config/contexts/ConfigContext.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import React, { useEffect } from "react";
import React from "react";

import { FlameNetwork, getChainConfigs } from "../chainConfigs";
import { getEnvVariable } from "../env";
Expand Down Expand Up @@ -29,7 +29,7 @@ export const ConfigContextProvider: React.FC<ConfigContextProps> = ({
let feedbackFormURL: string | null;
try {
feedbackFormURL = getEnvVariable("NEXT_PUBLIC_FEEDBACK_FORM_URL");
} catch (e) {
} catch {
feedbackFormURL = null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default function ConnectCosmosWalletButton({
await disconnectCosmosWallet();
};

disconnect().then((_) => {});
disconnect().then(() => {});
}, [disconnectCosmosWallet]);

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export const CosmosWalletProvider: React.FC<CosmosWalletProviderProps> = ({
]);

const disconnectCosmosWallet = useCallback(() => {
disconnect().then((_) => {});
disconnect().then(() => {});
resetState();
}, [disconnect, resetState]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ interface EvmWalletProviderProps {
export const EvmWalletProvider: React.FC<EvmWalletProviderProps> = ({
children,
}) => {
const { evmChains, selectedFlameNetwork, selectFlameNetwork } =
useAppConfig();
const { evmChains, selectedFlameNetwork } = useAppConfig();

const { openConnectModal } = useConnectModal();
const { disconnect } = useDisconnect();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ describe("AstriaWithdrawerService", () => {
mockContractAddress,
);
const writeContractMethodSpy = jest.spyOn(
// biome-ignore lint/suspicious/noExplicitAny: This is a test mock
/* eslint-disable @typescript-eslint/no-explicit-any */
service as any,
"writeContractMethod",
);
Expand Down Expand Up @@ -212,7 +212,7 @@ describe("AstriaWithdrawerService", () => {
);
const errorMessage = "Withdrawal failed";
jest
// biome-ignore lint/suspicious/noExplicitAny: This is a test mock
/* eslint-disable @typescript-eslint/no-explicit-any */
.spyOn(service as any, "writeContractMethod")
.mockRejectedValue(new Error(errorMessage));

Expand Down Expand Up @@ -246,7 +246,7 @@ describe("AstriaErc20WithdrawerService", () => {
mockContractAddress,
);
const writeContractMethodSpy = jest.spyOn(
// biome-ignore lint/suspicious/noExplicitAny: This is a test mock
/* eslint-disable @typescript-eslint/no-explicit-any */
service as any,
"writeContractMethod",
);
Expand Down Expand Up @@ -279,7 +279,7 @@ describe("AstriaErc20WithdrawerService", () => {
);
const errorMessage = "ERC20 withdrawal failed";
jest
// biome-ignore lint/suspicious/noExplicitAny: This is a test mock
/* eslint-disable @typescript-eslint/no-explicit-any */
.spyOn(service as any, "writeContractMethod")
.mockRejectedValue(new Error(errorMessage));

Expand All @@ -303,7 +303,7 @@ describe("AstriaErc20WithdrawerService", () => {
mockContractAddress,
);
const readContractMethodSpy = jest.spyOn(
// biome-ignore lint/suspicious/noExplicitAny: This is a test mock
/* eslint-disable @typescript-eslint/no-explicit-any */
service as any,
"readContractMethod",
);
Expand All @@ -323,7 +323,7 @@ describe("AstriaErc20WithdrawerService", () => {
);
const errorMessage = "Balance check failed";
jest
// biome-ignore lint/suspicious/noExplicitAny: This is a test mock
/* eslint-disable @typescript-eslint/no-explicit-any */
.spyOn(service as any, "readContractMethod")
.mockRejectedValue(new Error(errorMessage));
const mockAddress = "0x1234567890123456789012345678901234567890";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ export default function useBalancePolling<T>(
} finally {
setIsLoading(false);
}
}, [fetchBalance, config.enabled, config.onError]);
}, [config, fetchBalance]);

useEffect(() => {
getBalance().then((_) => {});
getBalance().then(() => {});

// setup polling if enabled
if (config.enabled && config.intervalMS) {
Expand Down

0 comments on commit cdfba73

Please sign in to comment.