Skip to content

Commit

Permalink
✨ Adding liquiditySource in quote (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-bellotti authored Apr 26, 2023
1 parent d3b4207 commit 46089df
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 22 deletions.
3 changes: 3 additions & 0 deletions src/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export const aQuote = (): Quote => ({
integratorFeesInUsd: 0,
integratorFeesBps: BigInt('0x0'),
priceRatioUsd: 0,
liquiditySource: 'DEX_AGGREGATOR',
});

export const aQuoteWithManySubRoutes = (): Quote => ({
Expand All @@ -83,6 +84,7 @@ export const aQuoteWithManySubRoutes = (): Quote => ({
chainId: constants.StarknetChainId.TESTNET,
expiry: 100000000000,
priceRatioUsd: 0,
liquiditySource: 'DEX_AGGREGATOR',
routes: [
{
name: 'AMM1',
Expand Down Expand Up @@ -137,6 +139,7 @@ export const aQuoteWithManyComplexRoutes = (): Quote => ({
integratorFeesInUsd: 0,
integratorFeesBps: BigInt('0x0'),
priceRatioUsd: 0,
liquiditySource: 'DEX_AGGREGATOR',
routes: [
{
name: 'AMM1',
Expand Down
1 change: 0 additions & 1 deletion src/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
Price,
PriceRequest,
Quote,
Quotee,
QuoteRequest,
RequestError,
Source,
Expand Down
22 changes: 1 addition & 21 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,27 +93,7 @@ export interface Quote {
integratorFeesInUsd: number;
integratorFeesBps: bigint;
priceRatioUsd: number;
}

export interface Quotee {
quoteId: string;
sellTokenAddress: string;
sellAmount: string;
sellAmountInUsd: number;
buyTokenAddress: string;
buyAmount: string;
buyAmountInUsd: number;
blockNumber?: number;
chainId: string;
expiry?: number;
routes: Route[];
avnuFees: string;
avnuFeesInUsd: number;
integratorFees: string;
avnuFeesBps: string;
integratorFeesInUsd: number;
integratorFeesBps: string;
priceRatioUsd: number;
liquiditySource: 'DEX_AGGREGATOR' | 'MARKET_MAKER';
}

export interface InvokeSwapResponse {
Expand Down

0 comments on commit 46089df

Please sign in to comment.