@@ -304,6 +304,17 @@ def freeze_with(self, client: Client):
304304 # For each node, set the node_account_id and build the transaction body
305305 # This allows the transaction to be submitted to any node in the network
306306
307+ # Use all nodes from client network
308+ # Resolve fee priority before building bodies:
309+ # 1. Explicit transaction fee (self.transaction_fee)
310+ # 2. Client default_max_transaction_fee
311+ # 3. Transaction class default (_default_transaction_fee)
312+ if self .transaction_fee is None :
313+ if client is not None and getattr (client , "default_max_transaction_fee" , None ) is not None :
314+ self .transaction_fee = client .default_max_transaction_fee
315+ else :
316+ self .transaction_fee = self ._default_transaction_fee
317+
307318 if self .batch_key :
308319 # For Inner Transaction of batch transaction node_account_id=0.0.0
309320 self .node_account_id = AccountId (0 , 0 , 0 )
@@ -323,17 +334,6 @@ def freeze_with(self, client: Client):
323334 self ._transaction_body_bytes [node_account_id ] = self .build_transaction_body ().SerializeToString ()
324335
325336 else :
326- # Use all nodes from client network
327- # Resolve fee priority before building bodies:
328- # 1. Explicit transaction fee (self.transaction_fee)
329- # 2. Client default_max_transaction_fee
330- # 3. Transaction class default (_default_transaction_fee)
331- if self .transaction_fee is None :
332- if client is not None and getattr (client , "default_max_transaction_fee" , None ) is not None :
333- self .transaction_fee = client .default_max_transaction_fee
334- else :
335- self .transaction_fee = self ._default_transaction_fee
336-
337337 for node in client .network .nodes :
338338 self .node_account_id = node ._account_id
339339 self ._transaction_body_bytes [node ._account_id ] = self .build_transaction_body ().SerializeToString ()
@@ -796,6 +796,7 @@ def from_bytes(transaction_bytes: bytes):
796796
797797 def set_max_transaction_fee (self , max_transaction_fee ):
798798 # Accept int, float, Decimal, or Hbar (but not bool)
799+ self ._require_not_frozen ()
799800
800801 if isinstance (max_transaction_fee , bool ) or not isinstance (max_transaction_fee , (int , float , Decimal , Hbar )):
801802 raise TypeError (
0 commit comments