Skip to content

Commit

Permalink
push
Browse files Browse the repository at this point in the history
  • Loading branch information
dzmitry-lahoda committed Nov 22, 2023
1 parent a43b584 commit 09ca56b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions contracts/cosmwasm/order/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ impl OrderContract<'_> {
.debug(&format!("mantis::solutions::current {:?}", all_solutions));

// pick up optimal solution with solves with bank
let mut a_in = 0;
let mut b_in = 0;
let mut a_in = 0u128;
let mut b_in = 0u128;
let (a, b) = ab.clone();
let mut transfers = vec![];
let mut solution_item: SolutionItem = possible_solution;
Expand Down
2 changes: 1 addition & 1 deletion contracts/cosmwasm/order/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub struct OrderItem {
impl OrderItem {
pub fn fill(&mut self, wanted_transfer: Uint128) {
// was given more or exact wanted - user happy
if wanted_transfer >= self.msg.wants.amount || self.msg.wants.amount == 0 {
if wanted_transfer >= self.msg.wants.amount || self.msg.wants.amount.u128() == <_>::default() {
self.given.amount = <_>::default();
self.msg.wants.amount = <_>::default();
} else {
Expand Down

0 comments on commit 09ca56b

Please sign in to comment.