Skip to content

Commit

Permalink
fix(lockup): improve wording, add check for termination
Browse files Browse the repository at this point in the history
Fix comments in owner.rs and owner_callbacks.rs from https://hackmd.io/@ailisp/rJbiDYr5_
  • Loading branch information
telezhnaya committed Jul 6, 2021
1 parent 5bf0005 commit 114437b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Binary file modified lockup/res/lockup_contract.wasm
Binary file not shown.
11 changes: 8 additions & 3 deletions lockup/src/owner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,9 +488,14 @@ impl LockupContract {
///
/// Requires 50 TGas (2 * BASE_GAS)
///
/// Adds full access key with the given public key to the account once the contract is fully
/// vested, lockup duration has expired and transfers are enabled.
/// This will allow owner to use this account as a regular account and remove the contract.
/// Adds full access key with the given public key to the account.
/// The following requirements should be met:
/// - The contract is fully vested;
/// - Lockup duration has expired;
/// - Transfers are enabled;
/// - If there’s a termination made by foundation, it has to be finished.
/// Full access key will allow owner to use this account as a regular account and remove
/// the contract.
pub fn add_full_access_key(&mut self, new_public_key: Base58PublicKey) -> Promise {
self.assert_owner();
self.assert_transfers_enabled();
Expand Down
1 change: 1 addition & 0 deletions lockup/src/owner_callbacks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ impl LockupContract {
"The given staking pool account ID is not whitelisted"
);
self.assert_staking_pool_is_not_selected();
self.assert_no_termination();
self.staking_information = Some(StakingInformation {
staking_pool_account_id,
status: TransactionStatus::Idle,
Expand Down

0 comments on commit 114437b

Please sign in to comment.