Skip to content

Commit

Permalink
refactor: rename splitte to categorized
Browse files Browse the repository at this point in the history
Signed-off-by: Gustavo Inacio <gustavo@semiotic.ai>
  • Loading branch information
gusinacio committed Dec 22, 2023
1 parent cd3bea8 commit 8616d13
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions tap_core/src/tap_manager/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ use crate::{
},
receipt_aggregate_voucher::ReceiptAggregateVoucher,
tap_receipt::{
Failed, ReceiptAuditor, ReceiptCheck, ReceiptWithId, ReceiptWithState, ReceivedReceipt,
Reserved, SplittedReceiptWithState,
CategorizedReceiptsWithState, Failed, ReceiptAuditor, ReceiptCheck, ReceiptWithId,
ReceiptWithState, ReceivedReceipt, Reserved,
},
Error,
};
Expand Down Expand Up @@ -148,7 +148,7 @@ where
source_error: anyhow::Error::new(err),
})?;

let SplittedReceiptWithState {
let CategorizedReceiptsWithState {
checking_receipts,
mut awaiting_reserve_receipts,
mut failed_receipts,
Expand Down
4 changes: 2 additions & 2 deletions tap_core/src/tap_receipt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use alloy_primitives::Address;
pub use receipt::Receipt;
pub use receipt_auditor::ReceiptAuditor;
pub use received_receipt::{
AwaitingReserve, Checking, Failed, ReceiptState, ReceiptWithId, ReceiptWithState,
ReceivedReceipt, Reserved, ResultReceipt, SplittedReceiptWithState,
AwaitingReserve, CategorizedReceiptsWithState, Checking, Failed, ReceiptState, ReceiptWithId,
ReceiptWithState, ReceivedReceipt, Reserved, ResultReceipt,
};

use serde::{Deserialize, Serialize};
Expand Down
5 changes: 2 additions & 3 deletions tap_core/src/tap_receipt/received_receipt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ where
}
}

pub struct SplittedReceiptWithState {
pub struct CategorizedReceiptsWithState {
pub(crate) awaiting_reserve_receipts: Vec<ReceiptWithState<AwaitingReserve>>,
pub(crate) checking_receipts: Vec<ReceiptWithId<Checking>>,
pub(crate) failed_receipts: Vec<ReceiptWithState<Failed>>,
Expand Down Expand Up @@ -136,7 +136,7 @@ impl From<ReceiptWithState<Reserved>> for ReceivedReceipt {
}
}

impl From<Vec<StoredReceipt>> for SplittedReceiptWithState {
impl From<Vec<StoredReceipt>> for CategorizedReceiptsWithState {
fn from(value: Vec<StoredReceipt>) -> Self {
let mut awaiting_reserve_receipts = Vec::new();
let mut checking_receipts = Vec::new();
Expand Down Expand Up @@ -398,7 +398,6 @@ impl<S> ReceiptWithState<S>
where
S: ReceiptState,
{

fn perform_state_changes_into<T>(self) -> ReceiptWithState<T>
where
T: ReceiptState,
Expand Down

0 comments on commit 8616d13

Please sign in to comment.