Skip to content

Commit

Permalink
remove admin controll for withdraw and claim rewards
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaieremia committed Dec 17, 2024
1 parent 288c488 commit b2cdf95
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
Binary file modified liquid-staking/.DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions liquid-staking/src/delegation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ pub trait DelegationModule:
ERROR_MAX_UN_DELEGATION_ADDRESSES
);

self.is_manager(&self.blockchain().get_caller(), true);
let caller = self.blockchain().get_caller();
self.is_manager(&caller, true);
let map_delegation_contract_data = self.delegation_contract_data(&contract_address);
require!(
map_delegation_contract_data.is_empty(),
Expand Down Expand Up @@ -78,7 +79,6 @@ pub trait DelegationModule:

map_delegation_contract_data.set(contract_data);

let caller = self.blockchain().get_caller();
self.tx()
.to(&contract_address)
.typed(proxy_delegation::DelegationMockProxy)
Expand Down
4 changes: 0 additions & 4 deletions liquid-staking/src/manage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@ pub trait ManageModule:
fn withdraw_pending(&self, contract: ManagedAddress) {
let storage_cache = StorageCache::new(self);

self.is_manager(&self.blockchain().get_caller(), true);

self.is_state_active(storage_cache.contract_state);

require!(
Expand All @@ -213,8 +211,6 @@ pub trait ManageModule:
fn claim_rewards(&self) {
let storage_cache = StorageCache::new(self);

self.is_manager(&self.blockchain().get_caller(), true);

self.is_state_active(storage_cache.contract_state);

let list_mapper = self.delegation_addresses_list();
Expand Down

0 comments on commit b2cdf95

Please sign in to comment.