Skip to content

Commit

Permalink
chore: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
gonchar1987 committed Jun 13, 2024
1 parent ef7a843 commit ad47d39
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 2 additions & 4 deletions intent/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,17 +243,15 @@ impl IntentContract {

detailed_intent.set_status(Status::Processing);

let intent = detailed_intent.get_intent();
let current_id = env::current_account_id();
let promise = if detailed_intent.get_intent().is_expired() {
let intent = detailed_intent.get_intent();

let promise = if detailed_intent.get_intent().is_expired() {
ext_ft::ext(intent.send.token_id.clone())
.with_attached_deposit(NearToken::from_yoctonear(1))
.ft_transfer(intent.initiator.clone(), intent.send.amount)
.then(Self::ext(current_id).change_intent_status(id, Status::Expired))
} else {
let intent = detailed_intent.get_intent();

if amount != intent.receive.amount {
return Err(ContractError::IncorrectAmount);
}
Expand Down
1 change: 0 additions & 1 deletion tests/src/utils/intent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ impl Intent for Account {
.transact()
.await
.unwrap();
dbg!(&result);
assert!(result.is_success(), "execution intent error: {result:#?}");
}

Expand Down

0 comments on commit ad47d39

Please sign in to comment.