diff --git a/core/model/src/payment.rs b/core/model/src/payment.rs index fd9a22dbf..908190069 100644 --- a/core/model/src/payment.rs +++ b/core/model/src/payment.rs @@ -53,14 +53,6 @@ pub mod local { Invoice(InvoicePayment), } - #[derive(Clone, Debug, Serialize, Deserialize)] - pub struct CollectPayments {} - impl RpcMessage for CollectPayments { - const ID: &'static str = "CollectPayments"; - type Item = (); - type Error = GenericError; - } - #[derive(Clone, Debug, Serialize, Deserialize, thiserror::Error)] #[error("{inner}")] pub struct GenericError { diff --git a/core/payment/src/processor.rs b/core/payment/src/processor.rs index ba2ba5adc..b000df9d7 100644 --- a/core/payment/src/processor.rs +++ b/core/payment/src/processor.rs @@ -40,11 +40,11 @@ use ya_core_model::driver::{ ValidateAllocationResult, }; use ya_core_model::payment::local::{ - CollectPayments, GenericError, GetAccountsError, GetDriversError, NotifyPayment, - ProcessBatchCycleError, ProcessBatchCycleInfo, ProcessBatchCycleResponse, ProcessBatchCycleSet, - ProcessPaymentsError, ProcessPaymentsNow, ProcessPaymentsNowResponse, RegisterAccount, - RegisterAccountError, RegisterDriver, RegisterDriverError, UnregisterAccount, - UnregisterAccountError, UnregisterDriver, UnregisterDriverError, + GenericError, GetAccountsError, GetDriversError, NotifyPayment, ProcessBatchCycleError, + ProcessBatchCycleInfo, ProcessBatchCycleResponse, ProcessBatchCycleSet, ProcessPaymentsError, + ProcessPaymentsNow, ProcessPaymentsNowResponse, RegisterAccount, RegisterAccountError, + RegisterDriver, RegisterDriverError, UnregisterAccount, UnregisterAccountError, + UnregisterDriver, UnregisterDriverError, }; use ya_core_model::payment::public::{SendPayment, SendSignedPayment, BUS_ID}; use ya_core_model::{identity, NodeId}; @@ -1015,10 +1015,6 @@ impl PaymentProcessor { .await } - pub async fn collect_payments(&self, msg: CollectPayments) -> Result<(), GenericError> { - Ok(()) - } - pub async fn verify_payment( &self, payment: Payment, diff --git a/core/payment/src/service.rs b/core/payment/src/service.rs index dc862d505..1a9d47a6b 100644 --- a/core/payment/src/service.rs +++ b/core/payment/src/service.rs @@ -51,7 +51,6 @@ mod local { log::debug!("Binding payment local service to service bus"); ServiceBinder::new(BUS_ID, db, processor) - .bind_with_processor(collect_payments) .bind_with_processor(register_driver) .bind_with_processor(unregister_driver) .bind_with_processor(register_account) @@ -114,16 +113,6 @@ mod local { log::debug!("Successfully bound payment local service to service bus"); } - async fn collect_payments( - db: DbExecutor, - processor: Arc, - sender: String, - msg: CollectPayments, - ) -> Result<(), GenericError> { - processor.collect_payments(msg).await?; - Ok(()) - } - async fn register_driver( db: DbExecutor, processor: Arc,