Skip to content

Commit

Permalink
Merge pull request #63 from buffrr/fix-outbid
Browse files Browse the repository at this point in the history
Fix outbid sending a bid after open
  • Loading branch information
buffrr authored Jan 23, 2025
2 parents 928aa3b + e5bf6d1 commit 222634c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
9 changes: 3 additions & 6 deletions node/src/wallets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -579,13 +579,10 @@ impl RpcWallet {
continue;
}

let foreign_input = match event.foreign_input {
None => continue,
Some(outpoint) => outpoint
};
if foreign_input != space.outpoint() {
res.outbid.push(space);
if event.foreign_input.is_some_and(|input| input == space.outpoint()) {
continue;
}
res.outbid.push(space);
}
}

Expand Down
10 changes: 5 additions & 5 deletions node/tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ async fn it_should_allow_outbidding(rig: &TestRig) -> anyhow::Result<()> {
alice_spaces_updated.winning.len(),
"alice must have one less space"
);
// assert_eq!(
// alices_spaces.outbid.len() + 1,
// alice_spaces_updated.outbid.len(),
// "alice must have one less space"
// );
assert_eq!(
alices_spaces.outbid.len() + 1,
alice_spaces_updated.outbid.len(),
"alice must have one less space"
);
assert_eq!(
bobs_spaces.winning.len() + 1,
bob_spaces_updated.winning.len(),
Expand Down

0 comments on commit 222634c

Please sign in to comment.