mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-09 15:02:47 -04:00
Process execution setup failure similarly to other failures
By merging it in the failure event of the root behaviour.
This commit is contained in:
parent
4ade5df0e5
commit
f5ca5faabf
3 changed files with 15 additions and 12 deletions
|
@ -20,7 +20,7 @@ pub enum OutEvent {
|
|||
msg: SwapRequest,
|
||||
channel: ResponseChannel<SwapResponse>,
|
||||
},
|
||||
ExecutionSetupDone(anyhow::Result<Box<State3>>),
|
||||
ExecutionSetupDone(Box<State3>),
|
||||
TransferProofAcknowledged,
|
||||
EncryptedSignature {
|
||||
msg: Box<EncryptedSignature>,
|
||||
|
@ -53,8 +53,10 @@ impl From<alice::OutEvent> for OutEvent {
|
|||
|
||||
impl From<execution_setup::OutEvent> for OutEvent {
|
||||
fn from(event: execution_setup::OutEvent) -> Self {
|
||||
use crate::protocol::alice::execution_setup::OutEvent::*;
|
||||
match event {
|
||||
execution_setup::OutEvent::Done(res) => OutEvent::ExecutionSetupDone(res.map(Box::new)),
|
||||
Done(state3) => OutEvent::ExecutionSetupDone(Box::new(state3)),
|
||||
Failure(err) => OutEvent::Failure(err),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue