feat(swap): show min deposit required for min_quantity

This commit is contained in:
Byron Hambly 2022-07-31 14:42:49 +02:00
parent 293cbb68d6
commit dc706c584a
No known key found for this signature in database
GPG key ID: DE8F6EA20A661697
4 changed files with 55 additions and 22 deletions

View file

@ -11,6 +11,7 @@ use bitcoin::Script;
use serde::{Deserialize, Serialize};
const SCRIPT_SIZE: usize = 34;
const TX_LOCK_WEIGHT: usize = 485;
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct TxLock {
@ -161,6 +162,10 @@ impl TxLock {
output: vec![tx_out],
}
}
pub fn weight() -> usize {
TX_LOCK_WEIGHT
}
}
impl From<TxLock> for PartiallySignedTransaction {