Skip to content

Commit

Permalink
Added denominator argument for functions registerDynamic and register…
Browse files Browse the repository at this point in the history
…AndSetAllRolesDynamic
  • Loading branch information
elvisboghiu committed Oct 24, 2024
1 parent bb1b7be commit 600892b
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -930,14 +930,18 @@ def create_transaction_for_registering_dynamic_token(self,
sender: IAddress,
token_name: str,
token_ticker: str,
token_type: TokenType) -> Transaction:
token_type: TokenType,
denominator: int = None) -> Transaction:

Check failure on line 934 in multiversx_sdk/core/transactions_factories/token_management_transactions_factory.py

View workflow job for this annotation

GitHub Actions / pyright

Expression of type "None" cannot be assigned to parameter of type "int"   "None" is not assignable to "int" (reportArgumentType)
parts: List[str] = [
"registerDynamic",
arg_to_string(token_name),
arg_to_string(token_ticker),
arg_to_string(token_type.value)
]

if token_type == TokenType.META and denominator is not None:
parts.append(arg_to_string(denominator))

return TransactionBuilder(
config=self._config,
sender=sender,
Expand All @@ -952,14 +956,18 @@ def create_transaction_for_registering_dynamic_and_setting_roles(self,
sender: IAddress,
token_name: str,
token_ticker: str,
token_type: TokenType) -> Transaction:
token_type: TokenType,
denominator: int = None) -> Transaction:

Check failure on line 960 in multiversx_sdk/core/transactions_factories/token_management_transactions_factory.py

View workflow job for this annotation

GitHub Actions / pyright

Expression of type "None" cannot be assigned to parameter of type "int"   "None" is not assignable to "int" (reportArgumentType)
parts: List[str] = [
"registerAndSetAllRolesDynamic",
arg_to_string(token_name),
arg_to_string(token_ticker),
arg_to_string(token_type.value)
]

if token_type == TokenType.META and denominator is not None:
parts.append(arg_to_string(denominator))

return TransactionBuilder(
config=self._config,
sender=sender,
Expand Down

0 comments on commit 600892b

Please sign in to comment.