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

@injectivelabs/utils

Package Overview
Dependencies
Maintainers
11
Versions
311
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@injectivelabs/utils - npm Package Compare versions

Comparing version 1.0.38 to 1.0.39

10

dist/helpers.d.ts

@@ -11,2 +11,12 @@ import { ComposerResponse } from '@injectivelabs/ts-types';

};
export declare const getStdFeeForToken: (token?: {
denom: string;
decimals: number;
}) => {
amount: {
denom: string;
amount: string;
}[];
gas: string;
};
//# sourceMappingURL=helpers.d.ts.map

24

dist/helpers.js
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.mapMultipleComposerResponseMessages = exports.isServerSide = exports.sleep = void 0;
exports.getStdFeeForToken = exports.mapMultipleComposerResponseMessages = exports.isServerSide = exports.sleep = void 0;
const BigNumberInBase_1 = __importDefault(require("./classes/BigNumber/BigNumberInBase"));
const BigNumberInWei_1 = __importDefault(require("./classes/BigNumber/BigNumberInWei"));
const constants_1 = require("./constants");
const sleep = (timeout) => new Promise((resolve) => setTimeout(resolve, timeout));

@@ -30,2 +36,18 @@ exports.sleep = sleep;

exports.mapMultipleComposerResponseMessages = mapMultipleComposerResponseMessages;
const getStdFeeForToken = (token = { denom: 'inj', decimals: 18 }) => {
const gasPrice = new BigNumberInWei_1.default(constants_1.DEFAULT_GAS_PRICE).toBase();
const gasPriceScaled = gasPrice.toWei(token.decimals);
return {
amount: [
{
denom: token.denom,
amount: new BigNumberInBase_1.default(constants_1.DEFAULT_GAS_LIMIT)
.times(gasPriceScaled)
.toString(),
},
],
gas: constants_1.DEFAULT_GAS_LIMIT.toString(),
};
};
exports.getStdFeeForToken = getStdFeeForToken;
//# sourceMappingURL=helpers.js.map

4

package.json
{
"name": "@injectivelabs/utils",
"description": "List of utils and helper functions that can be reused throughout Injective's projects.",
"version": "1.0.38",
"version": "1.0.39",
"author": {

@@ -43,3 +43,3 @@ "name": "Bojan Angjelkoski",

},
"gitHead": "ae63d770ca55242b7b884aafe2dd2a81369439f4"
"gitHead": "cb4c096488c1078c98906943faef9eadd1871700"
}

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