fix: types

This commit is contained in:
Kirill Litvinov
2023-11-28 07:16:21 +05:00
parent 643a2c8469
commit 87f9c738a5
2 changed files with 11 additions and 4 deletions

View File

@@ -526,6 +526,13 @@ class AggregatorWS {
availableAmountOut: item.aao,
})),
assetsNameMapping: json.anm,
usdInfo: json.usd && {
availableAmountIn: json.usd.aa,
availableAmountOut: json.usd.aao,
marketAmountOut: json.usd.mo,
marketAmountIn: json.usd.mi,
difference: json.usd.d,
},
};
switch (json.k) { // kind

View File

@@ -199,10 +199,10 @@ export type SwapInfoBase = {
assetsNameMapping?: Partial<Record<string, string>> | undefined
usdInfo?: {
availableAmountIn: number
availableAmountOut?: number
marketAmountIn: number
marketAmountOut?: number
difference: string
availableAmountOut: number | undefined
marketAmountOut: number
marketAmountIn: number | undefined
difference: string | undefined
}
}