Skip to content

Commit

Permalink
Merge PR cosmos#4831: Prevent community spend proposal from transferr…
Browse files Browse the repository at this point in the history
…ing funds to a ModuleAcc
  • Loading branch information
fedekunze authored and alexanderbez committed Aug 2, 2019
1 parent 9937101 commit cbc802c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions .pending/bugfixes/modules/_prevent-community-s
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#4831 Prevent community spend proposal from transferring funds to a module account
4 changes: 4 additions & 0 deletions x/distribution/keeper/proposal_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ import (

// HandleCommunityPoolSpendProposal is a handler for executing a passed community spend proposal
func HandleCommunityPoolSpendProposal(ctx sdk.Context, k Keeper, p types.CommunityPoolSpendProposal) sdk.Error {
if k.blacklistedAddrs[p.Recipient.String()] {
return sdk.ErrUnauthorized(fmt.Sprintf("%s is blacklisted from receiving external funds", p.Recipient))
}

err := k.DistributeFromFeePool(ctx, p.Amount, p.Recipient)
if err != nil {
return err
Expand Down

0 comments on commit cbc802c

Please sign in to comment.