Skip to content

Commit

Permalink
chore: Fix circular dep.
Browse files Browse the repository at this point in the history
  • Loading branch information
johngrantuk committed Jun 28, 2024
1 parent ef3ca3c commit ffbf752
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 20 deletions.
24 changes: 5 additions & 19 deletions src/entities/swap/swaps/v2/auraBalSwaps/auraBalSwaps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,15 @@ import { SwapKind, Hex } from '../../../../../types';
import { Address, PublicClient, createPublicClient, http } from 'viem';
import { getLimitAmount } from '../../../limits';
import { Slippage } from '@/entities/slippage';
import { Token } from '@/entities/token';
import { BALANCER_RELAYER, CHAINS } from '@/utils';
import { isAuraBalSwap, parseInputs } from './parseInputs';
import { queryJoinSwap, buildJoinSwapCall } from './joinSwap';
import { buildSwapExitCall, querySwapExit } from './swapExit';

export type SwapQueryInput = {
tokenIn: Token;
tokenOut: Token;
kind: SwapKind;
swapAmount: TokenAmount;
};

export type AuraBalSwapQueryOutput = {
inputAmount: TokenAmount;
expectedAmountOut: TokenAmount;
kind: AuraBalSwapKind;
};
import {
AuraBalSwapQueryOutput,
SwapQueryInput,
AuraBalSwapKind,
} from './types';

type AuraBalSwapBuildCallInput = {
slippage: Slippage;
Expand All @@ -37,11 +28,6 @@ type AuraBalSwapBuildOutput = {
minAmountOut: TokenAmount;
};

export enum AuraBalSwapKind {
FromAuraBal = 0,
ToAuraBal = 1,
}

export class AuraBalSwap {
public client: PublicClient;

Expand Down
1 change: 1 addition & 0 deletions src/entities/swap/swaps/v2/auraBalSwaps/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './auraBalSwaps';
export * from './types';
2 changes: 1 addition & 1 deletion src/entities/swap/swaps/v2/auraBalSwaps/parseInputs.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Address } from 'viem';
import { Token } from '@/entities/token';
import { AuraBalSwapKind, SwapQueryInput } from './auraBalSwaps';
import { AuraBalSwapKind, SwapQueryInput } from './types';
import { supportedTokens, auraBalToken } from './constants';
import { SwapKind } from '@/types';
import { TokenAmount } from '@/entities/tokenAmount';
Expand Down
21 changes: 21 additions & 0 deletions src/entities/swap/swaps/v2/auraBalSwaps/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Token } from '@/entities/token';
import { TokenAmount } from '@/entities/tokenAmount';
import { SwapKind } from '@/types';

export type SwapQueryInput = {
tokenIn: Token;
tokenOut: Token;
kind: SwapKind;
swapAmount: TokenAmount;
};

export type AuraBalSwapQueryOutput = {
inputAmount: TokenAmount;
expectedAmountOut: TokenAmount;
kind: AuraBalSwapKind;
};

export enum AuraBalSwapKind {
FromAuraBal = 0,
ToAuraBal = 1,
}

0 comments on commit ffbf752

Please sign in to comment.