Skip to content

Commit

Permalink
fix(utils): remove check for the BN
Browse files Browse the repository at this point in the history
  • Loading branch information
MilGard91 committed Apr 7, 2022
1 parent c605151 commit 50a7951
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/utils/stark.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import BN, { isBN } from 'bn.js';
import BN from 'bn.js';
import { gzip } from 'pako';

import { Calldata, CompressedProgram, Program, RawArgs, Signature } from '../types';
Expand Down Expand Up @@ -51,6 +51,5 @@ export function compileCalldata(args: RawArgs): Calldata {
}

export function estimatedFeeToMaxFee(estimatedFee: BigNumberish, overhead: number = 0.15): BN {
const fee = isBN(estimatedFee) ? estimatedFee : toBN(estimatedFee);
return fee.mul(toBN(overhead).add(toBN(1)));
return toBN(estimatedFee).mul(toBN(overhead).add(toBN(1)));
}

0 comments on commit 50a7951

Please sign in to comment.