This commit is contained in:
Kirill Litvinov
2023-10-02 14:21:43 +03:00
parent 3d1a23ab7b
commit 1a2f1d7940
2 changed files with 3 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@orionprotocol/sdk",
"version": "0.19.93-rc2",
"version": "0.19.93-rc3",
"description": "Orion Protocol SDK",
"main": "./lib/index.cjs",
"module": "./lib/index.js",

View File

@@ -46,8 +46,8 @@ export default async function generateSwapCalldata({
const curveRegistryAddress = safeGet(unit.contracts, 'curveRegistry')
const { assetToAddress, swapExecutorContractAddress, exchangeContractAddress } = await simpleFetch(unit.blockchainService.getInfo)();
let path = SafeArray.from(path_).map((swapInfo) => {
swapInfo.assetIn = ethers.utils.isAddress(swapInfo.assetIn.toLowerCase()) ? swapInfo.assetIn : safeGet(assetToAddress, swapInfo.assetIn);
swapInfo.assetOut = ethers.utils.isAddress(swapInfo.assetOut.toLowerCase()) ? swapInfo.assetOut : safeGet(assetToAddress, swapInfo.assetOut);
swapInfo.assetIn = ethers.utils.isAddress(swapInfo.assetIn.toLowerCase()) ? swapInfo.assetIn.toLowerCase() : safeGet(assetToAddress, swapInfo.assetIn);
swapInfo.assetOut = ethers.utils.isAddress(swapInfo.assetOut.toLowerCase()) ? swapInfo.assetOut.toLowerCase() : safeGet(assetToAddress, swapInfo.assetOut);
return swapInfo;
})
const factory = path.first().factory