From bb2fcb5aeb9eb91e0c795da53ddc36f04eab3e1f Mon Sep 17 00:00:00 2001 From: mubarak23 Date: Fri, 22 Nov 2024 16:22:07 +0100 Subject: [PATCH] format --- src/campaign.cairo | 30 ++++++++++++++++-------------- src/presets/campaign.cairo | 1 + 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/src/campaign.cairo b/src/campaign.cairo index 8e70e15..66a5fd8 100644 --- a/src/campaign.cairo +++ b/src/campaign.cairo @@ -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 } @@ -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 } diff --git a/src/presets/campaign.cairo b/src/presets/campaign.cairo index dcccfcf..c1ec8ed 100644 --- a/src/presets/campaign.cairo +++ b/src/presets/campaign.cairo @@ -21,3 +21,4 @@ // CampaignEvent: CampaignComponent::Event // } // } +