Skip to content

Commit 0777d65

Browse files
committed
Prefer confirmed bidouts
1 parent 48788ca commit 0777d65

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

wallet/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,11 @@ impl SpacesWallet {
308308
};
309309

310310
let placeholder = all
311-
.first()
311+
// always prefer confirmed ones since
312+
// we don't monitor mempool for other competing bids
313+
// this makes replacements smoother
314+
.iter().find(|x| x.confirmed)
315+
.or_else(|| all.first())
312316
.ok_or_else(|| anyhow::anyhow!("{}", msg))?
313317
.clone();
314318

0 commit comments

Comments
 (0)