diff --git a/onchain/src/social/deposit.cairo b/onchain/src/social/deposit.cairo index 2aeea47f..44f8288c 100644 --- a/onchain/src/social/deposit.cairo +++ b/onchain/src/social/deposit.cairo @@ -43,7 +43,7 @@ pub trait IDepositEscrow { #[derive(Drop, starknet::Event)] struct ClaimEvent { #[key] - deposit_id:DepositId, + deposit_id: DepositId, sender: ContractAddress, amount: u256, token_address: ContractAddress, @@ -53,7 +53,7 @@ struct ClaimEvent { #[derive(Drop, starknet::Event)] struct DepositEvent { #[key] - deposit_id:DepositId, + deposit_id: DepositId, sender: ContractAddress, amount: u256, token_address: ContractAddress, @@ -81,7 +81,6 @@ struct TransferEvent { } - #[starknet::contract] pub mod DepositEscrow { use core::num::traits::Zero; @@ -173,7 +172,16 @@ pub mod DepositEscrow { ttl: get_block_timestamp() + timelock } ); - self.emit(DepositEvent { deposit_id:deposit_id+1, sender:get_caller_address(), recipient:nostr_recipient, amount:amount, token_address:token_address }); + self + .emit( + DepositEvent { + deposit_id: deposit_id + 1, + sender: get_caller_address(), + recipient: nostr_recipient, + amount: amount, + token_address: token_address + } + ); DepositResult::Deposit(deposit_id) } @@ -190,7 +198,16 @@ pub mod DepositEscrow { erc20.transfer(get_caller_address(), deposit.amount); self.deposits.write(deposit_id, Default::default()); - self.emit(CancelEvent {deposit_id:deposit_id, sender:get_caller_address(), recipient:deposit.recipient, amount:deposit.amount, token_address:deposit.token_address }); + self + .emit( + CancelEvent { + deposit_id: deposit_id, + sender: get_caller_address(), + recipient: deposit.recipient, + amount: deposit.amount, + token_address: deposit.token_address + } + ); } fn claim(ref self: ContractState, request: SocialRequest) { @@ -205,7 +222,16 @@ pub mod DepositEscrow { self.nostr_to_sn.write(request.public_key, get_caller_address()); self.deposits.write(deposit_id, Default::default()); - self.emit(ClaimEvent { deposit_id:deposit_id, sender:get_caller_address(), recipient:request.public_key, amount:deposit.amount, token_address:deposit.token_address }); + self + .emit( + ClaimEvent { + deposit_id: deposit_id, + sender: get_caller_address(), + recipient: request.public_key, + amount: deposit.amount, + token_address: deposit.token_address + } + ); } } }