From 9ecf02d08fb8d8c1f810e4f2e9bd8fa594f9064d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Ag=C3=BCero?= <54730752+EmmanuelAR@users.noreply.github.com> Date: Thu, 24 Oct 2024 19:36:49 -0600 Subject: [PATCH] fix format and remove comments --- contracts/src/fund.cairo | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/contracts/src/fund.cairo b/contracts/src/fund.cairo index 105fd4b..5771102 100644 --- a/contracts/src/fund.cairo +++ b/contracts/src/fund.cairo @@ -37,13 +37,12 @@ mod Fund { // ************************************************************************* // EVENTS // ************************************************************************* - #[event] #[derive(Drop, starknet::Event)] enum Event { DonationWithdraw: DonationWithdraw, } - // Struct DonationWithdraw + #[derive(Drop, starknet::Event)] pub struct DonationWithdraw { #[key] @@ -175,12 +174,14 @@ mod Fund { starknet_dispatcher.transfer(self.getOwner(), balance); assert(self.getCurrentGoalState() != 0, 'Fund hasnt reached its goal yet'); self.setState(4); - // Emit Event DonationWithdraw (amount=balance) - self.emit(DonationWithdraw { - owner_address: self.getOwner(), - fund_contract_address: get_contract_address(), - withdrawn_amount: balance - }); + self + .emit( + DonationWithdraw { + owner_address: self.getOwner(), + fund_contract_address: get_contract_address(), + withdrawn_amount: balance + } + ); } } }