Skip to content

Commit 6b38081

Browse files
authored
fix: Use SDK TokenType enum instead of protobuf in examples (#731)
Signed-off-by: Adityarya11 <[email protected]>
1 parent 48441a1 commit 6b38081

19 files changed

+19
-18
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.
4444
- fix: Resolve `__eq__` type conflict in `CustomFee` class (#627)
4545
- Fixes a type conflict in `token_id.py` where `from_string` could receive `None`, preventing a runtime error by raising a `ValueError` if the input is missing. #630
4646
- Dependabot alerts (version bumps)
47+
- Fixed incorrect `TokenType` import (protobuf vs. SDK enum) in 18 example files.
4748

4849
### Breaking Changes
4950
- chore: changed the file names airdrop classes (#631)

examples/query_account_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from hiero_sdk_python.tokens.token_associate_transaction import TokenAssociateTransaction
2222
from hiero_sdk_python.tokens.token_grant_kyc_transaction import TokenGrantKycTransaction
2323
from hiero_sdk_python.tokens.supply_type import SupplyType
24-
from hiero_sdk_python.hapi.services.basic_types_pb2 import TokenType
24+
from hiero_sdk_python.tokens.token_type import TokenType
2525
from hiero_sdk_python.tokens.token_mint_transaction import TokenMintTransaction
2626
from hiero_sdk_python.tokens.nft_id import NftId
2727

examples/query_nft_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
PrivateKey,
1414
Network,
1515
)
16-
from hiero_sdk_python.hapi.services.basic_types_pb2 import TokenType
16+
from hiero_sdk_python.tokens.token_type import TokenType
1717
from hiero_sdk_python.query.token_nft_info_query import TokenNftInfoQuery
1818
from hiero_sdk_python.response_code import ResponseCode
1919
from hiero_sdk_python.tokens.nft_id import NftId

examples/query_payment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
PrivateKey,
1414
Network,
1515
)
16-
from hiero_sdk_python.hapi.services.basic_types_pb2 import TokenType
16+
from hiero_sdk_python.tokens.token_type import TokenType
1717
from hiero_sdk_python.query.account_balance_query import CryptoGetAccountBalanceQuery
1818
from hiero_sdk_python.hbar import Hbar
1919
from hiero_sdk_python.query.token_info_query import TokenInfoQuery

examples/query_token_info_fungible.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
PrivateKey,
1515
Network,
1616
)
17-
from hiero_sdk_python.hapi.services.basic_types_pb2 import TokenType
17+
from hiero_sdk_python.tokens.token_type import TokenType
1818
from hiero_sdk_python.query.token_info_query import TokenInfoQuery
1919
from hiero_sdk_python.response_code import ResponseCode
2020
from hiero_sdk_python.tokens.supply_type import SupplyType

examples/query_token_info_nft.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
PrivateKey,
1515
Network,
1616
)
17-
from hiero_sdk_python.hapi.services.basic_types_pb2 import TokenType
17+
from hiero_sdk_python.tokens.token_type import TokenType
1818
from hiero_sdk_python.query.token_info_query import TokenInfoQuery
1919
from hiero_sdk_python.response_code import ResponseCode
2020
from hiero_sdk_python.tokens.supply_type import SupplyType

examples/token_burn_fungible.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
PrivateKey,
1414
Network,
1515
)
16-
from hiero_sdk_python.hapi.services.basic_types_pb2 import TokenType
16+
from hiero_sdk_python.tokens.token_type import TokenType
1717
from hiero_sdk_python.query.token_info_query import TokenInfoQuery
1818
from hiero_sdk_python.response_code import ResponseCode
1919
from hiero_sdk_python.tokens.supply_type import SupplyType

examples/token_burn_nft.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
PrivateKey,
1414
Network,
1515
)
16-
from hiero_sdk_python.hapi.services.basic_types_pb2 import TokenType
16+
from hiero_sdk_python.tokens.token_type import TokenType
1717
from hiero_sdk_python.query.token_info_query import TokenInfoQuery
1818
from hiero_sdk_python.response_code import ResponseCode
1919
from hiero_sdk_python.tokens.supply_type import SupplyType

examples/token_grant_kyc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
Network,
1515
)
1616
from hiero_sdk_python.account.account_create_transaction import AccountCreateTransaction
17-
from hiero_sdk_python.hapi.services.basic_types_pb2 import TokenType
17+
from hiero_sdk_python.tokens.token_type import TokenType
1818
from hiero_sdk_python.hbar import Hbar
1919
from hiero_sdk_python.response_code import ResponseCode
2020
from hiero_sdk_python.tokens.supply_type import SupplyType

examples/token_reject_fungible_token.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
TransferTransaction,
1616
)
1717
from hiero_sdk_python.account.account_create_transaction import AccountCreateTransaction
18-
from hiero_sdk_python.hapi.services.basic_types_pb2 import TokenType
18+
from hiero_sdk_python.tokens.token_type import TokenType
1919
from hiero_sdk_python.hbar import Hbar
2020
from hiero_sdk_python.query.account_balance_query import CryptoGetAccountBalanceQuery
2121
from hiero_sdk_python.response_code import ResponseCode

0 commit comments

Comments
 (0)