mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-05 21:14:32 -04:00
Cleanup swap initialization for Alice and Bob
This commit is contained in:
parent
a8ebd4d16e
commit
1b167f3eb6
6 changed files with 72 additions and 281 deletions
|
@ -36,6 +36,15 @@ impl Display for Swap {
|
|||
}
|
||||
}
|
||||
|
||||
impl Swap {
|
||||
pub fn try_into_bob(self) -> Result<Bob> {
|
||||
match self {
|
||||
Swap::Bob(bob) => Ok(bob),
|
||||
Swap::Alice(_) => bail!("Swap instance is not Bob"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Database(sled::Db);
|
||||
|
||||
impl Database {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue