Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
mubarak23 committed Nov 22, 2024
1 parent a084d1a commit bb2fcb5
Show file tree
Hide file tree
Showing 2 changed files with 17 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
1 change: 1 addition & 0 deletions src/presets/campaign.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@
// CampaignEvent: CampaignComponent::Event
// }
// }

0 comments on commit bb2fcb5

Please sign in to comment.