Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit bee8770

Browse files
committed
Fix version check
1 parent 56bcfb6 commit bee8770

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/transaction/fee.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use super::error::TransactionError;
2-
use crate::definitions::constants::FEE_FACTOR;
2+
use crate::definitions::constants::{FEE_FACTOR, QUERY_VERSION_BASE};
33
use crate::execution::execution_entry_point::ExecutionResult;
44
use crate::services::api::contract_classes::deprecated_contract_class::EntryPointType;
55
use crate::state::cached_state::CachedState;
@@ -153,7 +153,9 @@ pub fn charge_fee<S: StateReader>(
153153
block_context,
154154
)?;
155155

156-
let actual_fee = if tx_execution_context.version != 0.into() {
156+
let actual_fee = if tx_execution_context.version != 0.into()
157+
&& tx_execution_context.version != *QUERY_VERSION_BASE
158+
{
157159
min(actual_fee, max_fee) * FEE_FACTOR
158160
} else {
159161
if actual_fee > max_fee {

0 commit comments

Comments
 (0)