-
Notifications
You must be signed in to change notification settings - Fork 93
Closed as not planned
Labels
Good First IssueIssues which are ideal for a first time or new project contributor.Issues which are ideal for a first time or new project contributor.
Description
TokenType and SupplyType are enums (could be int enums) but the proto does not allow for ints
This means functionally it works but there is a type conflict
We should correct in src/hiero_sdk_python/tokens/token_create_transaction.py
# Construct the TokenCreateTransactionBody
return token_create_pb2.TokenCreateTransactionBody(
name=self._token_params.token_name,
symbol=self._token_params.token_symbol,
decimals=self._token_params.decimals,
initialSupply=self._token_params.initial_supply,
tokenType=token_type_value, <--- raw enums
supplyType=supply_type_value, <--- raw enums
to 👍
# Construct the TokenCreateTransactionBody
return token_create_pb2.TokenCreateTransactionBody(
name=self._token_params.token_name,
symbol=self._token_params.token_symbol,
decimals=self._token_params.decimals,
initialSupply=self._token_params.initial_supply,
tokenType=basic_types_pb2.TokenType(self._token_params.token_type.value), <- wrapped
supplyType=basic_types_pb2.TokenSupplyType(self._token_params.supply_type.value), <- wrapped
This will help type checkers
Metadata
Metadata
Assignees
Labels
Good First IssueIssues which are ideal for a first time or new project contributor.Issues which are ideal for a first time or new project contributor.