ABS only sends quote response if sufficient XMR balance

This commit is contained in:
Daniel Karzel 2021-02-25 13:21:39 +11:00
parent fffa679f42
commit cad6a1c3a7
3 changed files with 28 additions and 4 deletions

View file

@ -206,12 +206,18 @@ pub trait WatchForTransfer {
}
#[derive(Debug, Clone, Copy, thiserror::Error)]
#[error("transaction does not pay enough: expected {expected:?}, got {actual:?}")]
#[error("transaction does not pay enough: expected {expected}, got {actual}")]
pub struct InsufficientFunds {
pub expected: Amount,
pub actual: Amount,
}
#[derive(Debug, Clone, Copy, thiserror::Error)]
#[error("The balance is too low, current balance: {balance}")]
pub struct BalanceTooLow {
pub balance: Amount,
}
#[async_trait]
pub trait CreateWalletForOutput {
async fn create_and_load_wallet_for_output(