Skip to content

Commit

Permalink
chore: make upgradesInfo optional
Browse files Browse the repository at this point in the history
  • Loading branch information
ruijialin-avalabs committed Oct 10, 2024
1 parent 9d97433 commit 3b8af31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/validateBurnedAmount/validateBurnedAmount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const validateBurnedAmount = ({
}: {
unsignedTx: UnsignedTx;
context: Context;
upgradesInfo: GetUpgradesInfoResponse;
upgradesInfo?: GetUpgradesInfoResponse;
burnedAmount?: bigint;
baseFee: bigint;
feeTolerance: number;
Expand All @@ -81,7 +81,7 @@ export const validateBurnedAmount = ({

if (
isEvmImportExportTx(tx) ||
(isEtnaEnabled(upgradesInfo) && isEtnaSupported(tx))
(upgradesInfo && isEtnaEnabled(upgradesInfo) && isEtnaSupported(tx))
) {
const feeAmount = isEvmImportExportTx(tx)
? baseFee * costCorethTx(unsignedTx)
Expand Down

0 comments on commit 3b8af31

Please sign in to comment.