Skip to content

Commit

Permalink
small cleanups. formatting. removed unused stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
steezeburger committed Dec 11, 2024
1 parent c63999e commit 61f7ee9
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 38 deletions.
15 changes: 8 additions & 7 deletions web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"buffer": "^6.0.3",
"react-app-rewired": "^2.2.1",
"source-map-explorer": "^2.5.3",
"stream-browserify": "^3.0.0"
"stream-browserify": "^3.0.0",
"webpack": "^5.97.1"
}
}
4 changes: 2 additions & 2 deletions web/src/components/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import logo from "logo-flame-w-text.svg";
function Navbar() {
const [isMobileMenuActive, setIsMobileMenuActive] = useState(false);

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

const { brandURL, bridgeURL, swapURL, poolURL } = useConfig();
const { brandURL, swapURL, poolURL } = useConfig();

return (
<nav
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { type Config, getPublicClient, getWalletClient } from "@wagmi/core";
import { parseUnits, type Address, type Hash } from "viem";
import { parseUnits } from "viem";
import { sepolia } from "wagmi/chains";
import { GenericContractService } from "../GenericContractService";
import {
AstriaWithdrawerService,
AstriaErc20WithdrawerService,
AstriaWithdrawerService,
createWithdrawerService,
} from "./AstriaWithdrawerService";

Expand Down
4 changes: 0 additions & 4 deletions web/src/features/EthWallet/types/index.ts

This file was deleted.

3 changes: 0 additions & 3 deletions web/src/features/KeplrWallet/hooks/useIbcChainSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
type IbcCurrency,
ibcCurrencyBelongsToChain,
} from "config";
import { useNotifications } from "features/Notifications";
import { getBalanceFromChain } from "features/KeplrWallet/services/ibc";
import { useBalancePolling } from "features/GetBalancePolling";
import { useChain } from "@cosmos-kit/react";
Expand All @@ -20,8 +19,6 @@ import { useChain } from "@cosmos-kit/react";
* @param ibcChains - The possible IBC chains to select from.
*/
export function useIbcChainSelection(ibcChains: IbcChains) {
const { addNotification } = useNotifications();

const [selectedIbcChain, setSelectedIbcChain] = useState<IbcChainInfo | null>(
null,
);
Expand Down
42 changes: 23 additions & 19 deletions web/src/setupTests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,35 +101,39 @@ jest.mock("osmojs", () => ({
bank: {
v1beta1: {
balance: jest.fn(() => ({
balance: { amount: "1000000", denom: "utia" }
}))
}
}
}
}))
}
}
balance: { amount: "1000000", denom: "utia" },
})),
},
},
},
})),
},
},
}));

// mock chain-registry
jest.mock("chain-registry", () => ({
assets: [],
chains: []
chains: [],
}));

// mock all cosmos-kit related packages
jest.mock("@cosmos-kit/keplr", () => ({
wallets: [{
name: "keplr",
prettyName: "Keplr",
mode: "extension"
}]
wallets: [
{
name: "keplr",
prettyName: "Keplr",
mode: "extension",
},
],
}));

jest.mock("@cosmos-kit/leap", () => ({
wallets: [{
name: "leap",
prettyName: "Leap",
mode: "extension"
}]
wallets: [
{
name: "leap",
prettyName: "Leap",
mode: "extension",
},
],
}));

0 comments on commit 61f7ee9

Please sign in to comment.