Skip to content

Commit

Permalink
replace franchisee.transfer with send to avoid malicious franchisee f…
Browse files Browse the repository at this point in the history
…reezing trust. Closes #1 thanks https://github.com/NickErrant
  • Loading branch information
skilesare committed Nov 9, 2017
1 parent 9577c32 commit a2db361
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contracts/FiatTrust.sol
Expand Up @@ -433,7 +433,10 @@ contract FiatTrust {
else{
custodian.transfer( (_feeAmount / franchiseeFactor).mul(franchiseeFactor - 1 ) );
FeePaid(custodian, (_feeAmount / franchiseeFactor).mul(franchiseeFactor - 1) );
franchisee.transfer(_feeAmount / franchiseeFactor);
//use send instead of tranfer to make franchisee responsible for accepting payment
//https://github.com/skilesare/catallaxtrust/issues/1
// h/t to https://github.com/NickErrant
franchisee.send(_feeAmount / franchiseeFactor);
FeePaid( custodian, _feeAmount / franchiseeFactor);
}
}
Expand Down

0 comments on commit a2db361

Please sign in to comment.