@curvefi/api 2.68.38 → 2.68.39
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.
|
@@ -47,6 +47,7 @@ export function routeFinderWorker() {
|
|
|
47
47
|
const _isVisitedCoin = (coinAddress, route) => route.route.find((r) => r.inputCoinAddress === coinAddress) !== undefined;
|
|
48
48
|
const _findPool = (route, poolId) => route.route.find((r) => r.poolId === poolId);
|
|
49
49
|
const findRoutes = ({ inputCoinAddress, outputCoinAddress, routerGraph, poolData, ybAssets }) => {
|
|
50
|
+
var _a;
|
|
50
51
|
inputCoinAddress = inputCoinAddress.toLowerCase();
|
|
51
52
|
outputCoinAddress = outputCoinAddress.toLowerCase();
|
|
52
53
|
const isYBAsset = ybAssets.includes(inputCoinAddress) || ybAssets.includes(outputCoinAddress);
|
|
@@ -57,7 +58,7 @@ export function routeFinderWorker() {
|
|
|
57
58
|
while (routes.length) {
|
|
58
59
|
const route = routes.pop();
|
|
59
60
|
const inCoin = route.route.length > 0 ? route.route[route.route.length - 1].outputCoinAddress : inputCoinAddress;
|
|
60
|
-
Object.entries(routerGraph[inCoin]).forEach((leaf) => {
|
|
61
|
+
Object.entries((_a = routerGraph[inCoin]) !== null && _a !== void 0 ? _a : {}).forEach((leaf) => {
|
|
61
62
|
const outCoin = leaf[0], steps = leaf[1];
|
|
62
63
|
if (_isVisitedCoin(outCoin, route))
|
|
63
64
|
return;
|