Do not allow transfers to a canceled campaign

This commit is contained in:
Jordi Baylina 2017-10-04 14:30:09 +02:00
parent bd5c29cf2f
commit 5fd25487b5
No known key found for this signature in database
GPG Key ID: 7480C80C1BE43112
5 changed files with 16 additions and 7 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -715,6 +715,8 @@ function donate(uint64 idGiver, uint64 idReceiver) payable {
Pledge storage n = findPledge(idPledge); Pledge storage n = findPledge(idPledge);
require(getPledgeLevel(n) < MAX_INTERCAMPAIGN_LEVEL); require(getPledgeLevel(n) < MAX_INTERCAMPAIGN_LEVEL);
require(!isCampaignCanceled(idReceiver));
uint64 oldPledge = findOrCreatePledge( uint64 oldPledge = findOrCreatePledge(
n.owner, n.owner,
n.delegationChain, n.delegationChain,
@ -787,6 +789,7 @@ function donate(uint64 idGiver, uint64 idReceiver) payable {
Pledge storage n = findPledge(idPledge); Pledge storage n = findPledge(idPledge);
require(getPledgeLevel(n) < MAX_SUBCAMPAIGN_LEVEL); require(getPledgeLevel(n) < MAX_SUBCAMPAIGN_LEVEL);
require(!isCampaignCanceled(idReceiver));
uint64 toPledge = findOrCreatePledge( uint64 toPledge = findOrCreatePledge(
n.owner, n.owner,

View File

@ -715,6 +715,8 @@ function donate(uint64 idGiver, uint64 idReceiver) payable {
Pledge storage n = findPledge(idPledge); Pledge storage n = findPledge(idPledge);
require(getPledgeLevel(n) < MAX_INTERCAMPAIGN_LEVEL); require(getPledgeLevel(n) < MAX_INTERCAMPAIGN_LEVEL);
require(!isCampaignCanceled(idReceiver));
uint64 oldPledge = findOrCreatePledge( uint64 oldPledge = findOrCreatePledge(
n.owner, n.owner,
n.delegationChain, n.delegationChain,
@ -787,6 +789,7 @@ function donate(uint64 idGiver, uint64 idReceiver) payable {
Pledge storage n = findPledge(idPledge); Pledge storage n = findPledge(idPledge);
require(getPledgeLevel(n) < MAX_SUBCAMPAIGN_LEVEL); require(getPledgeLevel(n) < MAX_SUBCAMPAIGN_LEVEL);
require(!isCampaignCanceled(idReceiver));
uint64 toPledge = findOrCreatePledge( uint64 toPledge = findOrCreatePledge(
n.owner, n.owner,

View File

@ -300,6 +300,8 @@ function donate(uint64 idGiver, uint64 idReceiver) payable {
Pledge storage n = findPledge(idPledge); Pledge storage n = findPledge(idPledge);
require(getPledgeLevel(n) < MAX_INTERCAMPAIGN_LEVEL); require(getPledgeLevel(n) < MAX_INTERCAMPAIGN_LEVEL);
require(!isCampaignCanceled(idReceiver));
uint64 oldPledge = findOrCreatePledge( uint64 oldPledge = findOrCreatePledge(
n.owner, n.owner,
n.delegationChain, n.delegationChain,
@ -372,6 +374,7 @@ function donate(uint64 idGiver, uint64 idReceiver) payable {
Pledge storage n = findPledge(idPledge); Pledge storage n = findPledge(idPledge);
require(getPledgeLevel(n) < MAX_SUBCAMPAIGN_LEVEL); require(getPledgeLevel(n) < MAX_SUBCAMPAIGN_LEVEL);
require(!isCampaignCanceled(idReceiver));
uint64 toPledge = findOrCreatePledge( uint64 toPledge = findOrCreatePledge(
n.owner, n.owner,