Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@0xsquid/sdk

Package Overview
Dependencies
Maintainers
0
Versions
161
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@0xsquid/sdk - npm Package Compare versions

Comparing version 2.8.13 to 2.8.19

10

dist/handlers/cosmos/index.js

@@ -55,3 +55,3 @@ "use strict";

executeRoute({ data, params, }) {
var _a, _b, _c;
var _a, _b, _c, _d, _e;
return __awaiter(this, void 0, void 0, function* () {

@@ -87,3 +87,9 @@ yield this.validateBalance({ data, params });

const gasPrice = (_c = route.transactionRequest) === null || _c === void 0 ? void 0 : _c.gasPrice;
return signer.sign(signerAddress, msgs, (0, stargate_1.calculateFee)(Math.trunc(estimatedGas * gasMultiplier), stargate_1.GasPrice.fromString(gasPrice)), "");
let memo = "";
if ((_d = data.route.transactionRequest) === null || _d === void 0 ? void 0 : _d.requestId) {
memo = JSON.stringify({
squidRequestId: (_e = data.route.transactionRequest) === null || _e === void 0 ? void 0 : _e.requestId,
});
}
return signer.sign(signerAddress, msgs, (0, stargate_1.calculateFee)(Math.trunc(estimatedGas * gasMultiplier), stargate_1.GasPrice.fromString(gasPrice)), memo);
});

@@ -90,0 +96,0 @@ }

7

dist/handlers/evm/index.js

@@ -193,3 +193,3 @@ "use strict";

populateRouteParams(tokensChains, params, signer) {
const { fromChain, toChain, fromToken, toToken } = params;
const { fromChain, toChain, fromToken, toToken, preHook } = params;
const _fromChain = tokensChains.getChainData(fromChain);

@@ -203,3 +203,6 @@ const _toChain = tokensChains.getChainData(toChain);

if (!fromIsNative) {
fromTokenContract = ethersAdapter.contract(_fromToken.address, erc20_json_1.default, signer || fromProvider);
// case preHook, we need to check balance / allowance instead of fromToken
// to avoid changing the entire approach, we only inject the address on the contract instance for on chain validation
// need to be considered that fundToken is unknown and we probably do not support
fromTokenContract = ethersAdapter.contract(preHook ? preHook.fundToken : _fromToken.address, erc20_json_1.default, signer || fromProvider);
}

@@ -206,0 +209,0 @@ return Object.assign(Object.assign({}, params), { fromChain: _fromChain, toChain: _toChain, fromToken: _fromToken, toToken: _toToken, fromTokenContract,

{
"name": "@0xsquid/sdk",
"version": "2.8.13",
"version": "2.8.19",
"description": "🛠 An SDK for building applications on top of 0xsquid",

@@ -45,3 +45,3 @@ "repository": {

"devDependencies": {
"@0xsquid/squid-types": "0.1.78",
"@0xsquid/squid-types": "0.1.80",
"@babel/core": "^7.18.10",

@@ -48,0 +48,0 @@ "@babel/preset-env": "^7.18.10",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc