Skip to content

Commit b3eba69

Browse files
committed
Updated arg order
1 parent c81c030 commit b3eba69

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

bittensor/core/extrinsics/asyncex/transfer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ async def _do_transfer(
2020
wallet: "Wallet",
2121
destination: str,
2222
amount: Optional[Balance],
23-
keep_alive: bool = True,
2423
wait_for_inclusion: bool = True,
2524
wait_for_finalization: bool = False,
2625
period: Optional[int] = None,
26+
keep_alive: bool = True,
2727
) -> tuple[bool, str, str]:
2828
"""
2929
Makes transfer from wallet to destination public key address.
@@ -33,14 +33,14 @@ async def _do_transfer(
3333
wallet (bittensor_wallet.Wallet): Bittensor wallet object to make transfer from.
3434
destination (str): Destination public key address (ss58_address or ed25519) of recipient.
3535
amount (bittensor.utils.balance.Balance): Amount to stake as Bittensor balance.
36-
keep_alive (bool): If `True`, will keep the existential deposit in the account.
3736
wait_for_inclusion (bool): If set, waits for the extrinsic to enter a block before returning `True`, or returns
3837
`False` if the extrinsic fails to enter the block within the timeout.
3938
wait_for_finalization (bool): If set, waits for the extrinsic to be finalized on the chain before returning
4039
`True`, or returns `False` if the extrinsic fails to be finalized within the timeout.
4140
period (Optional[int]): The number of blocks during which the transaction will remain valid after it's submitted.
4241
If the transaction is not included in a block within that number of blocks, it will expire and be rejected.
4342
You can think of it as an expiration date for the transaction.
43+
keep_alive (bool): If `True`, will keep the existential deposit in the account.
4444
4545
Returns:
4646
success, block hash, formatted error message

bittensor/core/extrinsics/transfer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ def _do_transfer(
1919
wallet: "Wallet",
2020
destination: str,
2121
amount: Optional[Balance],
22-
keep_alive: bool = True,
2322
wait_for_inclusion: bool = True,
2423
wait_for_finalization: bool = False,
2524
period: Optional[int] = None,
25+
keep_alive: bool = True,
2626
) -> tuple[bool, str, str]:
2727
"""
2828
Makes transfer from wallet to destination public key address.
@@ -32,14 +32,14 @@ def _do_transfer(
3232
wallet (bittensor_wallet.Wallet): Bittensor wallet object to make transfer from.
3333
destination (str): Destination public key address (ss58_address or ed25519) of recipient.
3434
amount (bittensor.utils.balance.Balance): Amount to stake as Bittensor balance. `None` if transferring all.
35-
keep_alive (bool): If `True`, will keep the existential deposit in the account.
3635
wait_for_inclusion (bool): If set, waits for the extrinsic to enter a block before returning `True`, or returns
3736
`False` if the extrinsic fails to enter the block within the timeout.
3837
wait_for_finalization (bool): If set, waits for the extrinsic to be finalized on the chain before returning
3938
`True`, or returns `False` if the extrinsic fails to be finalized within the timeout.
4039
period (Optional[int]): The number of blocks during which the transaction will remain valid after it's submitted.
4140
If the transaction is not included in a block within that number of blocks, it will expire and be rejected.
4241
You can think of it as an expiration date for the transaction.
42+
keep_alive (bool): If `True`, will keep the existential deposit in the account.
4343
4444
Returns:
4545
success, block hash, formatted error message

tests/unit_tests/extrinsics/test_transfer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ def test_do_transfer_is_success_true(
4141
fake_wallet,
4242
fake_dest,
4343
amount,
44-
keep_alive,
4544
fake_wait_for_inclusion,
4645
fake_wait_for_finalization,
46+
keep_alive=keep_alive,
4747
)
4848

4949
# Asserts
@@ -81,9 +81,9 @@ def test_do_transfer_is_success_false(subtensor, fake_wallet, mocker):
8181
fake_wallet,
8282
fake_dest,
8383
fake_transfer_balance,
84-
keep_alive,
8584
fake_wait_for_inclusion,
8685
fake_wait_for_finalization,
86+
keep_alive=keep_alive,
8787
)
8888

8989
# Asserts
@@ -122,9 +122,9 @@ def test_do_transfer_no_waits(subtensor, fake_wallet, mocker):
122122
fake_wallet,
123123
fake_dest,
124124
fake_transfer_balance,
125-
keep_alive,
126125
fake_wait_for_inclusion,
127126
fake_wait_for_finalization,
127+
keep_alive=keep_alive,
128128
)
129129

130130
# Asserts

0 commit comments

Comments
 (0)