Skip to content

Commit

Permalink
chore: fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bartosz-lipinski committed Nov 5, 2020
1 parent 0d2c6fa commit e9827a7
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 10 deletions.
2 changes: 0 additions & 2 deletions src/components/currencyInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
import { useUserAccounts, useMint, useCachedPool } from "../../utils/accounts";
import "./styles.less";
import { useConnectionConfig } from "../../utils/connection";
import { useCurrencyPairState } from "../../utils/currencyPair";
import { PoolIcon, TokenIcon } from "../tokenIcon";
import PopularTokens from "../../utils/token-list.json";
import { PublicKey } from "@solana/web3.js";
Expand All @@ -30,7 +29,6 @@ export const CurrencyInput = (props: {
const mint = useMint(props.mint);

const { env } = useConnectionConfig();
const { setPoolOperation } = useCurrencyPairState();

const tokens = PopularTokens[env] as KnownToken[];

Expand Down
6 changes: 3 additions & 3 deletions src/components/identicon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ export const Identicon = (props: {
address?: string;
style?: React.CSSProperties;
}) => {
const { address } = props;
const { address, style } = props;
const ref = useRef<HTMLDivElement>();

useEffect(() => {
if (address && ref.current) {
ref.current.innerHTML = "";
ref.current.appendChild(
Jazzicon(props.style?.width || 16, parseInt(address.slice(0, 10), 16))
Jazzicon(style?.width || 16, parseInt(address.slice(0, 10), 16))
);
}
}, [address]);
}, [address, style]);

return (
<div className="identicon-wrapper" ref={ref as any} style={props.style} />
Expand Down
4 changes: 1 addition & 3 deletions src/components/pool/view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,17 @@ import { ConfigProvider, Empty } from "antd";
import { useOwnedPools } from "../../utils/pools";
import { RemoveLiquidity } from "./remove";
import { useMint } from "../../utils/accounts";
import { useConnectionConfig } from "../../utils/connection";
import { PoolIcon } from "../tokenIcon";
import { PoolInfo, TokenAccount } from "../../models";
import { useCurrencyPairState } from "../../utils/currencyPair";
import "./view.less";
import { useEnrichedPools, useMidPriceInUSD } from "../../context/market";
import { useEnrichedPools } from "../../context/market";
import { formatUSD } from "../../utils/utils";

const PoolItem = (props: {
item: { pool: PoolInfo; isFeeAccount: boolean; account: TokenAccount };
poolDetails: any;
}) => {
const { env } = useConnectionConfig();
const { A, B } = useCurrencyPairState();
const item = props.item;
const mint = useMint(item.account.info.mint.toBase58());
Expand Down
2 changes: 1 addition & 1 deletion src/utils/accounts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { usePools } from "./pools";
import { TokenAccount, PoolInfo } from "./../models";
import { notify } from "./notifications";
import { chunks } from "./utils";
import { EventEmitter, AccountUpdateEvent } from "./eventEmitter";
import { EventEmitter } from "./eventEmitter";

const AccountsContext = React.createContext<any>(null);

Expand Down
2 changes: 1 addition & 1 deletion src/utils/eventEmitter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EventEmitter as Emitter, EventArgs } from "eventemitter3";
import { EventEmitter as Emitter } from "eventemitter3";

export class AccountUpdateEvent {
static type = "AccountUpdate";
Expand Down

0 comments on commit e9827a7

Please sign in to comment.