@sodax/sdk 1.4.5-beta → 1.5.1-beta

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.
package/dist/index.cjs CHANGED
@@ -8745,7 +8745,7 @@ var universalRouterAbi = [
8745
8745
  ];
8746
8746
 
8747
8747
  // ../types/dist/constants/index.js
8748
- var CONFIG_VERSION = 34;
8748
+ var CONFIG_VERSION = 36;
8749
8749
  var AVALANCHE_MAINNET_CHAIN_ID = "0xa86a.avax";
8750
8750
  var ARBITRUM_MAINNET_CHAIN_ID = "0xa4b1.arbitrum";
8751
8751
  var BASE_MAINNET_CHAIN_ID = "0x2105.base";
@@ -11823,7 +11823,8 @@ var moneyMarketSupportedTokens = {
11823
11823
  spokeChainConfig[SONIC_MAINNET_CHAIN_ID].supportedTokens.USDC,
11824
11824
  spokeChainConfig[SONIC_MAINNET_CHAIN_ID].supportedTokens.USDT,
11825
11825
  spokeChainConfig[SONIC_MAINNET_CHAIN_ID].supportedTokens.wS,
11826
- spokeChainConfig[SONIC_MAINNET_CHAIN_ID].supportedTokens.SODA
11826
+ spokeChainConfig[SONIC_MAINNET_CHAIN_ID].supportedTokens.SODA,
11827
+ ...Object.values(SodaTokens)
11827
11828
  ],
11828
11829
  [NEAR_MAINNET_CHAIN_ID]: [
11829
11830
  spokeChainConfig[NEAR_MAINNET_CHAIN_ID].supportedTokens.NEAR,
@@ -27841,8 +27842,10 @@ var MoneyMarketService = class _MoneyMarketService {
27841
27842
  }
27842
27843
  calls.push(EvmVaultTokenService.encodeWithdraw(bnUSDVault, bnUSD, translatedAmountIn));
27843
27844
  } else {
27844
- calls.push(Erc20Service.encodeApprove(assetAddress, vaultAddress, amount));
27845
- calls.push(EvmVaultTokenService.encodeDeposit(vaultAddress, assetAddress, amount));
27845
+ if (!this.configService.isValidVault(fromHubAsset.asset)) {
27846
+ calls.push(Erc20Service.encodeApprove(assetAddress, vaultAddress, amount));
27847
+ calls.push(EvmVaultTokenService.encodeDeposit(vaultAddress, assetAddress, amount));
27848
+ }
27846
27849
  }
27847
27850
  calls.push(Erc20Service.encodeApprove(repayToken, this.config.lendingPool, translatedAmountIn));
27848
27851
  calls.push(
@@ -34959,7 +34962,6 @@ var AssetService = class {
34959
34962
  calls.push(EvmVaultTokenService.encodeWithdraw(assetConfig.vault, assetConfig.asset, vaultAmount));
34960
34963
  const translatedAmount = EvmVaultTokenService.translateIncomingDecimals(assetConfig.decimal, vaultAmount);
34961
34964
  if (dstChainId === this.hubProvider.chainConfig.chain.id) {
34962
- calls.push(Erc20Service.encodeTransfer(assetConfig.asset, recipient, translatedAmount));
34963
34965
  if (assetConfig.asset.toLowerCase() === this.configService.spokeChainConfig[dstChainId].addresses.wrappedSonic.toLowerCase()) {
34964
34966
  const withdrawToCall = {
34965
34967
  address: assetConfig.asset,