@0xsquid/sdk
Advanced tools
Comparing version 1.1.0-beta.3 to 1.1.0-beta.4
@@ -21,3 +21,2 @@ "use strict"; | ||
exports.Squid = void 0; | ||
const axelarjs_sdk_1 = require("@axelar-network/axelarjs-sdk"); | ||
const ethers_1 = require("ethers"); | ||
@@ -156,17 +155,3 @@ const axios_1 = __importDefault(require("axios")); | ||
} | ||
const sdk = new axelarjs_sdk_1.AxelarQueryAPI({ | ||
environment: this.config?.baseUrl && !this.config.baseUrl.includes("testnet") | ||
? "mainnet" | ||
: "testnet" | ||
}); | ||
let gasFee; | ||
try { | ||
gasFee = await sdk.estimateGasFee(fromChain.nativeCurrency.name, toChain.nativeCurrency.name, toChain.nativeCurrency.symbol, transactionRequest.destinationChainGas); | ||
} | ||
catch (error) { | ||
gasFee = "3513000021000000"; | ||
} | ||
const value = fromIsNative | ||
? ethers_1.ethers.BigNumber.from(params.fromAmount).add(ethers_1.ethers.BigNumber.from(gasFee)) | ||
: ethers_1.ethers.BigNumber.from(gasFee); | ||
const value = ethers_1.ethers.BigNumber.from(route.transactionRequest.value); | ||
let tx = { | ||
@@ -173,0 +158,0 @@ to: targetAddress, |
@@ -96,5 +96,4 @@ import { ethers } from "ethers"; | ||
targetAddress: string; | ||
gasReceiver: boolean; | ||
data: string; | ||
destinationChainGas: number; | ||
value: number; | ||
}; | ||
@@ -101,0 +100,0 @@ export declare type RouteData = SwapData[]; |
{ | ||
"name": "@0xsquid/sdk", | ||
"version": "1.1.0-beta.3", | ||
"version": "1.1.0-beta.4", | ||
"description": "🛠 An SDK for building applications on top of 0xsquid", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39229
783