From edbe34b315a5d544723683da7dc1c57babeb616b Mon Sep 17 00:00:00 2001 From: Vlad Bucur Date: Thu, 8 Aug 2024 14:36:54 +0300 Subject: [PATCH] Format --- contracts/on-chain-claim/src/contract.rs | 7 +++++-- contracts/on-chain-claim/tests/tests.rs | 5 +---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/contracts/on-chain-claim/src/contract.rs b/contracts/on-chain-claim/src/contract.rs index 059e88e8..746cbe68 100644 --- a/contracts/on-chain-claim/src/contract.rs +++ b/contracts/on-chain-claim/src/contract.rs @@ -49,7 +49,7 @@ pub trait OnChainClaimContract: address_info.last_epoch_claimed + 1 == current_epoch, "missed epoch" ); - + address_info.current_streak += 1; address_info.total_epochs_claimed += 1; address_info.last_epoch_claimed = current_epoch; @@ -68,7 +68,10 @@ pub trait OnChainClaimContract: let current_epoch = self.blockchain().get_block_epoch(); let address_info_mapper = self.address_info(&caller); - require!(!address_info_mapper.is_empty(), "can't reset streak for new address"); + require!( + !address_info_mapper.is_empty(), + "can't reset streak for new address" + ); address_info_mapper.update(|address_info| { address_info.current_streak = 1; diff --git a/contracts/on-chain-claim/tests/tests.rs b/contracts/on-chain-claim/tests/tests.rs index b38dc121..25230398 100644 --- a/contracts/on-chain-claim/tests/tests.rs +++ b/contracts/on-chain-claim/tests/tests.rs @@ -243,10 +243,7 @@ fn check_after_claim() { .set_state_step(SetStateStep::new().block_epoch(25)) .whitebox_call_check( &on_chain_claim_whitebox, - ScCallStep::new() - .from(USER1_ADDR) - .to(SC_ADDR) - .no_expect(), + ScCallStep::new().from(USER1_ADDR).to(SC_ADDR).no_expect(), |sc| { sc.claim(); },