Skip to content

Commit f3f0716

Browse files
fix(sdk-coin-flrp): use assert for bigint comparisons in import fee tests
should.above() coerces to number and fails on bigint values, breaking the build. Compare with native > via assert instead. Ticket: CECHO-1821
1 parent 941d0a0 commit f3f0716

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

modules/sdk-coin-flrp/test/unit/lib/importInCTxBuilder.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,10 @@ describe('Flrp Import In C Tx Builder', () => {
252252

253253
// The gas-aware fee (including the real AtomicTxBaseCost, ~10,000) must exceed
254254
// the underpriced legacy estimate that caused "insufficient funds" on broadcast.
255-
actualFee.should.be.above(underpricedFee);
255+
assert(
256+
actualFee > underpricedFee,
257+
`Expected actualFee (${actualFee}) to be above underpricedFee (${underpricedFee})`
258+
);
256259
});
257260

258261
it('should pad the supplied base fee to absorb volatility between signing and broadcast', async () => {
@@ -276,7 +279,9 @@ describe('Flrp Import In C Tx Builder', () => {
276279
// Same input should be deterministic, and strictly greater than the raw baseFee * gas
277280
// (i.e. some padding is applied on top of the network-observed base fee).
278281
BigInt(paddedTx.fee.fee).should.equal(BigInt(unpaddedFeeEquivalentTx.fee.fee));
279-
BigInt(paddedTx.fee.fee).should.be.above(baseFeeWei * 11300n); // > known real gas cost * baseFee, proving padding
282+
const paddedFee = BigInt(paddedTx.fee.fee);
283+
const minExpectedFee = baseFeeWei * 11300n; // > known real gas cost * baseFee, proving padding
284+
assert(paddedFee > minExpectedFee, `Expected paddedFee (${paddedFee}) to be above ${minExpectedFee}`);
280285
});
281286
});
282287

0 commit comments

Comments
 (0)