Skip to content

Commit be8211f

Browse files
committed
chore: updated accountBalanceInWeiBars
Signed-off-by: Logan Nguyen <[email protected]>
1 parent 4ff777e commit be8211f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/relay/src/lib/precheck.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export class Precheck {
182182
balance(tx: Transaction, accountBalance: number): void {
183183
const txGasPrice = BigInt(tx.gasPrice || tx.maxFeePerGas! + tx.maxPriorityFeePerGas!);
184184
const txTotalValue = tx.value + txGasPrice * tx.gasLimit;
185-
const accountBalanceInWeiBars = BigInt(accountBalance.toString()) * BigInt(constants.TINYBAR_TO_WEIBAR_COEF);
185+
const accountBalanceInWeiBars = BigInt(accountBalance) * BigInt(constants.TINYBAR_TO_WEIBAR_COEF);
186186

187187
if (accountBalanceInWeiBars < txTotalValue) {
188188
throw predefined.INSUFFICIENT_ACCOUNT_BALANCE;

0 commit comments

Comments
 (0)