mirror of https://github.com/nucypher/nucypher.git
Small docs update for collecting reward
Co-authored-by: Derek Pierre <derek.pierre@gmail.com>pull/2097/head
parent
0e46140e8f
commit
6c68fba65c
|
@ -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
|
||||
---------------------------------------
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue