mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-01-11 15:39:37 -05:00
Bubble up unrecoverable errors instead of expecting
This does introduce the ability of expressing incorrect combinations of the enums `SwapFailed` and `Reason`, but these are just internal to this function and it's terser that way.
This commit is contained in:
parent
1251681cfd
commit
bae391ff9c
@ -224,8 +224,6 @@ where
|
||||
Either::Right(_) => return Err(SwapFailed::AfterBtcLock(Reason::BtcExpired)),
|
||||
};
|
||||
|
||||
// NOTE: If any of this fails, Bob will never be able to take the monero.
|
||||
// Therefore, there is no way to handle these errors other than aborting
|
||||
let tx_redeem_sig = tx_redeem
|
||||
.extract_signature_by_key(tx_redeem_published, b.public())
|
||||
.map_err(|_| SwapFailed::AfterBtcRedeem(Reason::BtcRedeemSignature))?;
|
||||
|
Loading…
Reference in New Issue
Block a user