@synthra-swap/smart-order-router 3.15.7 → 3.15.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MixedRouteSDK, Protocol, SwapRouter as SwapRouter02, Trade } from '@uniswap/router-sdk';
|
|
2
2
|
import { Route as V2RouteRaw } from '@uniswap/v2-sdk';
|
|
3
|
-
import { Route as V3RouteRaw } from '@uniswap/v3-sdk';
|
|
3
|
+
import { Route as V3RouteRaw, Pool } from '@uniswap/v3-sdk';
|
|
4
4
|
import { TradeType } from '@synthra-swap/sdk-core';
|
|
5
5
|
import { SwapRouter as UniveralRouter, UNIVERSAL_ROUTER_ADDRESS, } from '@synthra-swap/universal-router-sdk';
|
|
6
6
|
import _ from 'lodash';
|
|
@@ -20,6 +20,8 @@ export function buildTrade(tokenInCurrency, tokenOutCurrency, tradeType, routeAm
|
|
|
20
20
|
console.log("route", route);
|
|
21
21
|
console.log("amount", amount);
|
|
22
22
|
console.log("quote", quote);
|
|
23
|
+
console.log("instance OF ROUTE.POOLS", route.pools.constructor.name);
|
|
24
|
+
console.log("TYPE OF NEEDED are same", route.pools instanceof Pool);
|
|
23
25
|
// The route, amount and quote are all in terms of wrapped tokens.
|
|
24
26
|
// When constructing the Trade object the inputAmount/outputAmount must
|
|
25
27
|
// use native currencies if specified by the user. This is so that the Trade knows to wrap/unwrap.
|
|
@@ -103,6 +105,7 @@ export function buildTrade(tokenInCurrency, tokenOutCurrency, tradeType, routeAm
|
|
|
103
105
|
outputAmount: quoteCurrency,
|
|
104
106
|
};
|
|
105
107
|
});
|
|
108
|
+
|
|
106
109
|
const trade = new Trade({ v2Routes, v3Routes, mixedRoutes, tradeType });
|
|
107
110
|
return trade;
|
|
108
111
|
}
|