Merge patterns

This commit is contained in:
Thomas Eizinger 2021-06-24 19:32:15 +10:00
parent 8fad8fb2b6
commit dffe4351a8
No known key found for this signature in database
GPG key ID: 651AC83A6C6C8B96

View file

@ -176,24 +176,19 @@ where
HandlerOutEvent::Initiated(send_wallet_snapshot) => { HandlerOutEvent::Initiated(send_wallet_snapshot) => {
self.events.push_back(OutEvent::Initiated { send_wallet_snapshot }) self.events.push_back(OutEvent::Initiated { send_wallet_snapshot })
} }
HandlerOutEvent::Completed(swap_setup_result) => { HandlerOutEvent::Completed(Ok((swap_id, state3))) => {
match swap_setup_result {
Ok((swap_id, state3)) => {
self.events.push_back(OutEvent::Completed { self.events.push_back(OutEvent::Completed {
peer_id, peer_id,
swap_id, swap_id,
state3 state3
}) })
} },
Err(error) => { HandlerOutEvent::Completed(Err(error)) => {
self.events.push_back(OutEvent::Error { self.events.push_back(OutEvent::Error {
peer_id, peer_id,
error error
}) })
} },
}
}
} }
} }