mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-12-10 06:15:35 -05:00
parent
a133321255
commit
1f9ac64166
1 changed files with 8 additions and 4 deletions
|
|
@ -123,12 +123,16 @@ pub async fn refund(
|
|||
Ok(state)
|
||||
}
|
||||
Err(error) => {
|
||||
let state3 = db.get_states(swap_id).await?.iter().find_map(|state| {
|
||||
let state3 = db
|
||||
.get_states(swap_id)
|
||||
.await?
|
||||
.iter()
|
||||
.find_map(|state| {
|
||||
if let State::Bob(BobState::BtcLocked { state3, .. }) = state {
|
||||
Some(state3.clone())
|
||||
} else {
|
||||
None
|
||||
}
|
||||
} else {
|
||||
None
|
||||
}
|
||||
});
|
||||
if state3
|
||||
.expect("Error: weren't able to extract State3 from database.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue