rubic-sdk 4.28.0-alpha-syncswap-linea.1 → 4.28.1-alpha-syncswap-tokens.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -233610,7 +233610,8 @@ class SyncSwapAbstractProvider extends evm_on_chain_provider_1.EvmOnChainProvide
233610
233610
  }
233611
233611
  const paths = sync_swap_path_factory_1.SyncSwapPathFactory.findAllPossiblePaths(fromProxy.address, toProxy.address, availablePools);
233612
233612
  const filteredPaths = await sync_swap_path_factory_1.SyncSwapPathFactory.getBestPath(paths, fromWithoutFee.stringWeiAmount, this.blockchain);
233613
- const bestRoute = await sync_swap_router_1.SyncSwapRouter.findBestAmountsForPathsExactIn(filteredPaths, fromWithoutFee.stringWeiAmount, this.blockchain);
233613
+ const sortedPaths = filteredPaths.filter(item => item.length === this.maxTransitTokens + 1);
233614
+ const bestRoute = await sync_swap_router_1.SyncSwapRouter.findBestAmountsForPathsExactIn(sortedPaths, fromWithoutFee.stringWeiAmount, this.blockchain);
233614
233615
  const to = new tokens_1.PriceTokenAmount({
233615
233616
  ...toToken.asStruct,
233616
233617
  weiAmount: new bignumber_js_1.default(bestRoute.amountOut.toString())
@@ -242080,6 +242081,7 @@ class LineaSyncSwapProvider extends sync_swap_abstract_provider_1.SyncSwapAbstra
242080
242081
  '0x265b25e22bcd7f10a5bd6e6410f10537cc7567e8' // ceMATIC
242081
242082
  ];
242082
242083
  this.masterAddress = '0x608Cb7C3168427091F5994A45Baf12083964B4A3';
242084
+ this.maxTransitTokens = 1;
242083
242085
  }
242084
242086
  }
242085
242087
  exports.LineaSyncSwapProvider = LineaSyncSwapProvider;
@@ -247691,6 +247693,7 @@ class ZkSyncSyncSwapProvider extends sync_swap_abstract_provider_1.SyncSwapAbstr
247691
247693
  '0x3355df6D4c9C3035724Fd0e3914dE96A5a83aaf4' // USDC
247692
247694
  ];
247693
247695
  this.masterAddress = '0xbb05918e9b4ba9fe2c8384d223f0844867909ffb';
247696
+ this.maxTransitTokens = 1;
247694
247697
  }
247695
247698
  }
247696
247699
  exports.ZkSyncSyncSwapProvider = ZkSyncSyncSwapProvider;