File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -488,14 +488,22 @@ def _build_reject_token_transaction(
488488) -> TokenRejectTransaction :
489489 transaction = TokenRejectTransaction ().set_grpc_deadline (DEFAULT_GRPC_TIMEOUT )
490490
491- if params .ownerId :
491+ if params .ownerId is not None :
492492 transaction .set_owner_id (AccountId .from_string (params .ownerId ))
493493
494- if params .tokenIds :
495- transaction .set_token_ids ([TokenId .from_string (token ) for token in params .tokenIds ])
496-
497494 if params .serialNumbers :
498- transaction .set_nft_ids ([NftId .from_string (serial ) for serial in params .serialNumbers ])
495+ nft_ids = [
496+ NftId (
497+ TokenId .from_string (params .tokenIds [0 ]),
498+ int (serial_number ),
499+ )
500+ for serial_number in params .serialNumbers
501+ ]
502+
503+ transaction .set_nft_ids (nft_ids )
504+
505+ elif params .tokenIds :
506+ transaction .set_token_ids ([TokenId .from_string (token ) for token in params .tokenIds ])
499507
500508 return transaction
501509
@@ -507,7 +515,7 @@ def reject_token(params: RejectTokenParams) -> RejectTokenResponse:
507515 transaction = _build_reject_token_transaction (params )
508516
509517 if params .commonTransactionParams is not None :
510- params .commonTransactionParams .apply_common_params (transaction , params . commonTransactionParams )
518+ params .commonTransactionParams .apply_common_params (transaction , client )
511519
512520 response = transaction .execute (client , wait_for_receipt = False )
513521 receipt = response .get_receipt (client , validate_status = True )
You can’t perform that action at this time.
0 commit comments