Skip to content

Commit

Permalink
removed test and event for withdrawal function
Browse files Browse the repository at this point in the history
  • Loading branch information
Pvsaint committed Nov 28, 2024
1 parent b0d491e commit 4b09e10
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 115 deletions.
11 changes: 0 additions & 11 deletions src/campaign.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,6 @@ mod TokengiverCampaign {
CreateCampaign: CreateCampaign,
DonationCreated: DonationCreated,
DeployedTokenGiverNFT: DeployedTokenGiverNFT,
Withdrawal: Withdrawal,
}

#[derive(Drop, starknet::Event)]
struct Withdrawal {
#[key]
campaign_address: ContractAddress,
#[key]
recipient: ContractAddress,
amount: u256,
}

#[derive(Drop, starknet::Event)]
Expand Down Expand Up @@ -176,7 +166,6 @@ mod TokengiverCampaign {
let transfer_result = token_dispatcher.transfer(caller, amount);
assert!(transfer_result, "Transfer failed");
self.withdrawal_balance.write(campaign_address, available_balance - amount);
self.emit(Withdrawal { campaign_address, recipient: caller, amount });
}

// *************************************************************************
Expand Down
104 changes: 0 additions & 104 deletions tests/test_withdraw.cairo

This file was deleted.

0 comments on commit 4b09e10

Please sign in to comment.