UNPKG

@swaptoshi/dex-module

Version:

Klayr decentralized exchange (dex) on-chain module

14 lines 608 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.verifyBaseFee = verifyBaseFee; async function verifyBaseFee(context) { if (!this._config || !this._feeMethod) return; const config = await this._config.getConfig(context); if (context.transaction.module === this.name) { if (context.transaction.fee < BigInt(config.baseFee[context.transaction.command])) { throw new Error(`Insufficient transaction fee to pay for base fee of ${config.baseFee[context.transaction.command]}`); } } } //# sourceMappingURL=verifyBaseFee.js.map