Skip to content

Commit

Permalink
Add distribute rewards guard / auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Mauro Lacy committed Jan 29, 2025
1 parent 749400c commit b7e7f7b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contracts/btc-staking/src/staking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,10 @@ pub fn handle_distribute_rewards(
) -> Result<Vec<Event>, ContractError> {
let config = CONFIG.load(deps.storage)?;

// TODO: Check that the sender is the finality contract (AML)
// Check that the sender is the finality contract (AML)
if info.sender != config.finality {
return Err(ContractError::Unauthorized);
}

// Error if no proper funds to distribute
let amount = must_pay(info, &config.denom)?;
Expand Down

0 comments on commit b7e7f7b

Please sign in to comment.