depolymerization

wire gateway for Bitcoin/Ethereum
Log | Files | Refs | Submodules | README | LICENSE

status.rs (1831B)


      1 /*
      2   This file is part of TALER
      3   Copyright (C) 2022 Taler Systems SA
      4 
      5   TALER is free software; you can redistribute it and/or modify it under the
      6   terms of the GNU Affero General Public License as published by the Free Software
      7   Foundation; either version 3, or (at your option) any later version.
      8 
      9   TALER is distributed in the hope that it will be useful, but WITHOUT ANY
     10   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
     11   A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.
     12 
     13   You should have received a copy of the GNU Affero General Public License along with
     14   TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
     15 */
     16 //! Transactions status in database
     17 
     18 /// Debit transaction status
     19 ///           -> Requested  API request
     20 /// Requested -> Sent       Announced to the bitcoin network
     21 /// Sent      -> Requested  Conflicting transaction (reorg)
     22 #[derive(Debug, Clone, Copy, PartialEq, Eq, sqlx::Type)]
     23 #[allow(non_camel_case_types)]
     24 #[sqlx(type_name = "debit_status")]
     25 pub enum DebitStatus {
     26     /// Debit have been requested (default)
     27     requested,
     28     /// Debit have been announced to the bitcoin network
     29     sent,
     30 }
     31 
     32 /// Bounce transaction status
     33 ///           -> Requested  Credit in wrong format
     34 /// Requested -> Ignored    Insufficient found
     35 /// Requested -> Sent       Announced to the bitcoin network
     36 /// Sent      -> Requested  Conflicting transaction (reorg)
     37 #[derive(Debug, Clone, Copy, PartialEq, Eq, sqlx::Type)]
     38 #[allow(non_camel_case_types)]
     39 #[sqlx(type_name = "bounce_status")]
     40 pub enum BounceStatus {
     41     /// Bounce have been requested (default)
     42     requested,
     43     /// Bounce will never be sent (e.g: bounce amount smaller than bounce fee)
     44     ignored,
     45     /// Bounce have been announced to the bitcoin network
     46     sent,
     47 }