From 970c2011ef150a113f3508bcdaba1881acea8bae Mon Sep 17 00:00:00 2001 From: "Miquel A. Cabot" Date: Mon, 6 Jun 2022 09:08:23 +0200 Subject: [PATCH] Move FixedRateExchange interface types to @types --- src/@types/FixedPrice.ts | 26 +++++++++++++++ src/contracts/pools/FixedRateExchange.ts | 41 +----------------------- 2 files changed, 27 insertions(+), 40 deletions(-) diff --git a/src/@types/FixedPrice.ts b/src/@types/FixedPrice.ts index 3fe6ea43..8527a7f0 100644 --- a/src/@types/FixedPrice.ts +++ b/src/@types/FixedPrice.ts @@ -25,3 +25,29 @@ export interface PriceAndFees { marketFeeAmount: string consumeMarketFeeAmount: string } + +export interface FixedPriceExchange { + active: boolean + exchangeOwner: string + datatoken: string + baseToken: string + fixedRate: string + dtDecimals: string + btDecimals: string + dtBalance: string + btBalance: string + dtSupply: string + btSupply: string + withMint: boolean + allowedSwapper: string + exchangeId?: string +} + +export interface FeesInfo { + opcFee: string + marketFee: string + marketFeeCollector: string + marketFeeAvailable: string + oceanFeeAvailable: string + exchangeId: string +} diff --git a/src/contracts/pools/FixedRateExchange.ts b/src/contracts/pools/FixedRateExchange.ts index 88fc921b..c5d28c41 100644 --- a/src/contracts/pools/FixedRateExchange.ts +++ b/src/contracts/pools/FixedRateExchange.ts @@ -13,46 +13,7 @@ import { ZERO_ADDRESS } from '../../utils' import { Config, ConfigHelper } from '../../config' -import { PriceAndFees } from '../../@types' - -export interface FixedPriceExchange { - active: boolean - exchangeOwner: string - datatoken: string - baseToken: string - fixedRate: string - dtDecimals: string - btDecimals: string - dtBalance: string - btBalance: string - dtSupply: string - btSupply: string - withMint: boolean - allowedSwapper: string - exchangeId?: string -} - -export interface FeesInfo { - opcFee: string - marketFee: string - marketFeeCollector: string - marketFeeAvailable: string - oceanFeeAvailable: string - exchangeId: string -} -export interface FixedPriceSwap { - exchangeId: string - caller: string - baseTokenAmount: string - datatokenAmount: string -} - -/* eslint-disable no-unused-vars */ -export enum FixedRateCreateProgressStep { - CreatingExchange, - ApprovingDatatoken -} -/* eslint-enable no-unused-vars */ +import { PriceAndFees, FeesInfo, FixedPriceExchange } from '../../@types' export class FixedRateExchange { /** Ocean related functions */