@injectivelabs/utils
Advanced tools
Comparing version 1.0.58 to 1.0.59
@@ -21,2 +21,16 @@ import { ComposerResponse } from '@injectivelabs/ts-types'; | ||
}; | ||
export declare const getStdFee: (gas?: string, gasPrice?: number) => { | ||
amount: { | ||
denom: string; | ||
amount: string; | ||
}[]; | ||
gas: string; | ||
}; | ||
export declare const getDefaultStdFee: () => { | ||
amount: { | ||
amount: string; | ||
denom: string; | ||
}[]; | ||
gas: string; | ||
}; | ||
//# sourceMappingURL=helpers.d.ts.map |
@@ -6,6 +6,7 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getStdFeeForToken = exports.mapMultipleComposerResponseMessages = exports.isServerSide = exports.sleep = void 0; | ||
exports.getDefaultStdFee = exports.getStdFee = exports.getStdFeeForToken = exports.mapMultipleComposerResponseMessages = exports.isServerSide = exports.sleep = void 0; | ||
const bignumber_js_1 = __importDefault(require("bignumber.js")); | ||
const constants_1 = require("./constants"); | ||
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)); | ||
@@ -51,2 +52,14 @@ exports.sleep = sleep; | ||
exports.getStdFeeForToken = getStdFeeForToken; | ||
const getStdFee = (gas = constants_1.DEFAULT_GAS_LIMIT.toString(), gasPrice = constants_1.DEFAULT_GAS_PRICE) => ({ | ||
amount: [ | ||
{ | ||
denom: 'inj', | ||
amount: new bignumber_js_1.default(gas).times(gasPrice).toString(), | ||
}, | ||
], | ||
gas: constants_1.DEFAULT_GAS_LIMIT.toString(), | ||
}); | ||
exports.getStdFee = getStdFee; | ||
const getDefaultStdFee = () => constants_1.DEFAULT_STD_FEE; | ||
exports.getDefaultStdFee = getDefaultStdFee; | ||
//# sourceMappingURL=helpers.js.map |
{ | ||
"name": "@injectivelabs/utils", | ||
"description": "List of utils and helper functions that can be reused throughout Injective's projects.", | ||
"version": "1.0.58", | ||
"version": "1.0.59", | ||
"author": { | ||
@@ -44,3 +44,3 @@ "name": "Bojan Angjelkoski", | ||
}, | ||
"gitHead": "97e2a16931acaf30918cdfb47dd4b169077921b1" | ||
"gitHead": "34d5cb0f00b1ddc79afbfb08fae7f6cfbb9b3122" | ||
} |
Sorry, the diff of this file is not supported yet
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
70768
757