firma-js-chain-2.0
Version:
The Official FirmaChain Javascript SDK written in Typescript
21 lines (20 loc) • 1.01 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DefaultTxMisc = exports.getSignAndBroadcastOption = exports.DefaultBasicFeeGrantOption = void 0;
exports.DefaultBasicFeeGrantOption = { spendLimit: undefined, expiration: undefined };
function getSignAndBroadcastOption(denom, txMisc) {
if (txMisc === void 0) { txMisc = exports.DefaultTxMisc; }
if (txMisc.memo == null)
txMisc.memo = "";
if (txMisc.fee == null)
txMisc.fee = 2000;
if (txMisc.gas == null)
txMisc.gas = 200000;
if (txMisc.feeGranter == null)
txMisc.feeGranter = "";
var gasFeeAmount = { denom: denom, amount: txMisc.fee.toString() };
var defaultFee = { amount: [gasFeeAmount], gas: txMisc.gas.toString(), granter: txMisc.feeGranter };
return { fee: defaultFee, memo: txMisc.memo };
}
exports.getSignAndBroadcastOption = getSignAndBroadcastOption;
exports.DefaultTxMisc = { memo: "", fee: 2000, gas: 200000, feeGranter: "" };