Skip to content

Commit

Permalink
Merge pull request #14 from Token-Giver/anonfedora_convert_campaign_c…
Browse files Browse the repository at this point in the history
…omment_presets

Anonfedora convert campaign comment presets
  • Loading branch information
mubarak23 authored Nov 22, 2024
2 parents 9bbba6e + 05a0480 commit 7871cf6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
30 changes: 16 additions & 14 deletions src/campaign.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,13 @@ mod TokengiverCampaign {
let count = self.count.read();
let mut i: u16 = 1;

while i < count + 1 {
let campaignAddress: ContractAddress = self.campaigns.read(i);
let campaign: Campaign = self.campaign.read(campaignAddress);
campaigns.append(campaign.metadata_URI);
i += 1;
};
while i < count
+ 1 {
let campaignAddress: ContractAddress = self.campaigns.read(i);
let campaign: Campaign = self.campaign.read(campaignAddress);
campaigns.append(campaign.metadata_URI);
i += 1;
};
campaigns
}

Expand All @@ -163,14 +164,15 @@ mod TokengiverCampaign {
let count = self.count.read();
let mut i: u16 = 1;

while i < count + 1 {
let campaignAddress: ContractAddress = self.campaigns.read(i);
let campaign: Campaign = self.campaign.read(campaignAddress);
if campaign.campaign_owner == user {
campaigns.append(campaign.metadata_URI);
}
i += 1;
};
while i < count
+ 1 {
let campaignAddress: ContractAddress = self.campaigns.read(i);
let campaign: Campaign = self.campaign.read(campaignAddress);
if campaign.campaign_owner == user {
campaigns.append(campaign.metadata_URI);
}
i += 1;
};
campaigns
}

Expand Down
2 changes: 2 additions & 0 deletions src/presets/campaign.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@
// CampaignEvent: CampaignComponent::Event
// }
// }


0 comments on commit 7871cf6

Please sign in to comment.