Skip to content

Commit

Permalink
Offers for native aarch not allowed
Browse files Browse the repository at this point in the history
  • Loading branch information
drewstaylor committed Aug 4, 2023
1 parent ce5bdb3 commit 4cd3dc3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@ pub fn execute_finish(deps: DepsMut,
amount: swap.price,
};
check_sent_required_payment(&info.funds, Some(required_payment))?;

// Native aarch offers not allowed
if swap.swap_type {
return Err(ContractError::InvalidInput {});
}
}

// XXX: @jjj This part is pretty confusing
Expand Down
2 changes: 1 addition & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub enum ContractError {
#[error("Send some coins to create an atomic swap")]
EmptyBalance {},

#[error("InvalidInput")]
#[error("Invalid input")]
InvalidInput {},

#[error("Atomic swap not yet expired")]
Expand Down

0 comments on commit 4cd3dc3

Please sign in to comment.