We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ff777e commit be8211fCopy full SHA for be8211f
packages/relay/src/lib/precheck.ts
@@ -182,7 +182,7 @@ export class Precheck {
182
balance(tx: Transaction, accountBalance: number): void {
183
const txGasPrice = BigInt(tx.gasPrice || tx.maxFeePerGas! + tx.maxPriorityFeePerGas!);
184
const txTotalValue = tx.value + txGasPrice * tx.gasLimit;
185
- const accountBalanceInWeiBars = BigInt(accountBalance.toString()) * BigInt(constants.TINYBAR_TO_WEIBAR_COEF);
+ const accountBalanceInWeiBars = BigInt(accountBalance) * BigInt(constants.TINYBAR_TO_WEIBAR_COEF);
186
187
if (accountBalanceInWeiBars < txTotalValue) {
188
throw predefined.INSUFFICIENT_ACCOUNT_BALANCE;
0 commit comments