diff --git a/docs/source/guides/network_node/staking_guide.rst b/docs/source/guides/network_node/staking_guide.rst index fa440b353..834d303c1 100644 --- a/docs/source/guides/network_node/staking_guide.rst +++ b/docs/source/guides/network_node/staking_guide.rst @@ -477,6 +477,9 @@ that. Note that you will need to confirm two transactions if you collect both types of staking compensation if you use a hardware wallet. +.. note:: If you want to withdraw all tokens when all of them are unlocked - + make sure to call ``nucypher stake mint`` before that to obtain last reward too + Staking using a preallocation contract --------------------------------------- diff --git a/nucypher/cli/commands/stake.py b/nucypher/cli/commands/stake.py index 2b953c690..fb9a193da 100644 --- a/nucypher/cli/commands/stake.py +++ b/nucypher/cli/commands/stake.py @@ -831,7 +831,7 @@ def collect_reward(general_config, emitter.echo(NO_FEE_TO_WITHDRAW, color='red') raise click.Abort - emitter.echo(message=COLLECTING_ETH_FEE.format(reward_amount=fee_amount)) + emitter.echo(message=COLLECTING_ETH_FEE.format(fee_amount=fee_amount)) policy_receipt = STAKEHOLDER.collect_policy_fee(collector_address=withdraw_address) paint_receipt_summary(receipt=policy_receipt, chain_name=STAKEHOLDER.wallet.blockchain.client.chain_name, diff --git a/tests/integration/cli/test_stake_cli_functionality.py b/tests/integration/cli/test_stake_cli_functionality.py index 38f1f4c39..9b357c3bd 100644 --- a/tests/integration/cli/test_stake_cli_functionality.py +++ b/tests/integration/cli/test_stake_cli_functionality.py @@ -44,7 +44,7 @@ from nucypher.cli.literature import ( GENERIC_SELECT_ACCOUNT, SELECTED_ACCOUNT, WORKLOCK_CLAIM_ADVISORY, NO_TOKENS_TO_WITHDRAW, COLLECTING_TOKEN_REWARD, CONFIRM_COLLECTING_WITHOUT_MINTING, - NO_FEE_TO_WITHDRAW, COLLECTING_ETH_REWARD, NO_MINTABLE_PERIODS, STILL_LOCKED_TOKENS, CONFIRM_MINTING + NO_FEE_TO_WITHDRAW, COLLECTING_ETH_FEE, NO_MINTABLE_PERIODS, STILL_LOCKED_TOKENS, CONFIRM_MINTING ) from nucypher.config.constants import TEMPORARY_DOMAIN from nucypher.types import NuNits @@ -245,7 +245,7 @@ def test_collecting_token_reward(click_runner, surrogate_staker, mock_policy_man user_input = INSECURE_DEVELOPMENT_PASSWORD result = click_runner.invoke(stake, collection_args, input=user_input, catch_exceptions=False) assert result.exit_code == 0 - assert COLLECTING_ETH_REWARD.format(reward_amount=fee_amount_eth) in result.output + assert COLLECTING_ETH_FEE.format(fee_amount=fee_amount_eth) in result.output mock_policy_manager_agent.get_fee_amount.assert_called_once_with(staker_address=surrogate_staker.checksum_address) mock_policy_manager_agent.collect_policy_fee.assert_called_once()