status.rs (2068B)
1 /* 2 This file is part of TALER 3 Copyright (C) 2022, 2026 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 -> Confirmed Mined in an N old block 22 /// Confirmed -> Requested Conflicting transaction (reorg) 23 #[derive(Debug, Clone, Copy, PartialEq, Eq, sqlx::Type)] 24 #[allow(non_camel_case_types)] 25 #[sqlx(type_name = "debit_status")] 26 pub enum DebitStatus { 27 /// Debit have been requested (default) 28 requested, 29 /// Debit have been announced to the bitcoin network 30 sent, 31 /// Debit have been mined in an N old block 32 confirmed, 33 } 34 35 /// Bounce transaction status 36 /// -> Requested Credit in wrong format 37 /// Requested -> Ignored Insufficient found 38 /// Requested -> Sent Announced to the bitcoin network 39 /// Sent -> Confirmed Mined in an N old block 40 /// Confirmed -> Requested Conflicting transaction (reorg) 41 #[derive(Debug, Clone, Copy, PartialEq, Eq, sqlx::Type)] 42 #[allow(non_camel_case_types)] 43 #[sqlx(type_name = "bounce_status")] 44 pub enum BounceStatus { 45 /// Bounce have been requested (default) 46 requested, 47 /// Bounce will never be sent (e.g: bounce amount smaller than bounce fee) 48 ignored, 49 /// Bounce have been announced to the bitcoin network 50 sent, 51 /// Bounce have been mined in an N old block 52 confirmed, 53 }