Skip to content

Commit

Permalink
feat: nw cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
anukulpandey committed Dec 20, 2023
1 parent a51ae96 commit e2218e1
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 20 deletions.
3 changes: 2 additions & 1 deletion src/api/tokens.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import axios, { AxiosResponse } from 'axios';
import { BigNumber } from 'ethers';
import {
Network, ReefSigner, reefTokenWithAmount, Token,
ReefSigner, reefTokenWithAmount, Token,
} from '../state';
import type {Network} from "@reef-chain/util-lib/dist/network";

Check failure on line 6 in src/api/tokens.ts

View workflow job for this annotation

GitHub Actions / lint

`@reef-chain/util-lib/dist/network` type import should occur before import of `../state`

interface AccountTokensRes {
tokens: AccountTokensResBalance[];
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useAddLiquidity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import { ERC20 } from '../assets/abi/ERC20';
import { getReefswapRouter } from '../rpc';
import {
AddressToNumber,
Network,
NotifyFun, ReefSigner,
resolveSettings,
Token,
TokenWithAmount,
} from '../state';
import type {DexProtocolv2 as Network} from "@reef-chain/util-lib/dist/network";

Check failure on line 16 in src/hooks/useAddLiquidity.tsx

View workflow job for this annotation

GitHub Actions / lint

`@reef-chain/util-lib/dist/network` type import should occur before import of `../assets/abi/ERC20`
import {
AddLiquidityActions,
SetNewPoolSupplyAction,
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useInitReefState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type { Signer as InjectedSigner } from '@polkadot/api/types';
import { map } from 'rxjs';
import { hooks, rpc, appState } from '..';
import { ReefSigner } from '../state';
import { Network } from '../state/network';
import type {Network} from "@reef-chain/util-lib/dist/network";

Check failure on line 10 in src/hooks/useInitReefState.ts

View workflow job for this annotation

GitHub Actions / lint

`@reef-chain/util-lib/dist/network` type import should occur before import of `..`
import { useAsyncEffect } from './useAsyncEffect';
import { useInjectExtension } from './useInjectExtension';
import { useObservableState } from './useObservableState';
Expand Down
3 changes: 2 additions & 1 deletion src/hooks/useLoadSignerTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ import {
isDataSet,
} from '../utils/dataWithProgress';
import {
Network, ReefSigner, reefTokenWithAmount, Token,
ReefSigner, reefTokenWithAmount, Token,
} from '../state';
import type {Network} from "@reef-chain/util-lib/dist/network";

Check failure on line 12 in src/hooks/useLoadSignerTokens.ts

View workflow job for this annotation

GitHub Actions / lint

`@reef-chain/util-lib/dist/network` type import should occur before import of `../utils/dataWithProgress`
import { loadSignerTokens } from '../api/tokens';

export const useLoadSignerTokens = (
Expand Down
3 changes: 2 additions & 1 deletion src/hooks/useRemoveLiquidity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ import { ReefswapPair } from '../assets/abi/ReefswapPair';
import { getReefswapRouter } from '../rpc';
import {
AddressToNumber,
Network, NotifyFun, Pool, ReefSigner, REMOVE_DEFAULT_SLIPPAGE_TOLERANCE, resolveSettings, Token,
NotifyFun, Pool, ReefSigner, REMOVE_DEFAULT_SLIPPAGE_TOLERANCE, resolveSettings, Token,
} from '../state';
import type {DexProtocolv2 as Network} from "@reef-chain/util-lib/dist/network";

Check failure on line 14 in src/hooks/useRemoveLiquidity.tsx

View workflow job for this annotation

GitHub Actions / lint

`@reef-chain/util-lib/dist/network` type import should occur before import of `../assets/abi/ReefswapPair`
import {
RemoveLiquidityActions, RemoveLiquidityState, setCompleteStatusAction, setLoadingAction, setPercentageAction, setPoolAction, setStatusAction, setToken1Action, setToken2Action,
} from '../store';
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useSwapState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import { getReefswapRouter } from '../rpc';
import {
AddressToNumber,
ensureTokenAmount,
Network,
NotifyFun,
Pool,
ReefSigner,
resolveSettings, Token,
TokenWithAmount,
} from '../state';
import type {DexProtocolv2 as Network} from "@reef-chain/util-lib/dist/network";

Check failure on line 17 in src/hooks/useSwapState.ts

View workflow job for this annotation

GitHub Actions / lint

`@reef-chain/util-lib/dist/network` type import should occur before import of `../assets/abi/ERC20`
import { SwapAction } from '../store';
import {
clearTokenAmountsAction, setCompleteStatusAction, setLoadingAction, setPoolAction, setStatusAction, setToken1Action, setToken2Action, setTokenPricesAction,
Expand Down
1 change: 0 additions & 1 deletion src/state/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ export * from './token';
export * from './nft';
export * from './pool';
export * from './types';
export * from './network';
12 changes: 0 additions & 12 deletions src/state/network.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/utils/transactionUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Provider } from "@reef-chain/evm-provider";
import { BigNumber } from "ethers";
import { network as nw } from "@reef-chain/util-lib";
import { ReefSigner } from "../state";
import { Network } from "../state/network";
import type {Network} from "@reef-chain/util-lib/dist/network";

Check failure on line 7 in src/utils/transactionUtil.ts

View workflow job for this annotation

GitHub Actions / lint

`@reef-chain/util-lib/dist/network` type import should occur before import of `../state`

export type TxStatusHandler = (status: TxStatusUpdate) => void;

Expand Down

0 comments on commit e2218e1

Please sign in to comment.