refactor(router): Remove the locker call in the psync flow (#5348)

This commit is contained in:
Shankar Singh C
2024-07-18 00:19:36 +05:30
committed by GitHub
parent 67bfb1cfec
commit 24360b22ef
2 changed files with 14 additions and 32 deletions

View File

@ -299,27 +299,18 @@ where
#[instrument(skip_all)]
async fn make_pm_data<'a>(
&'a self,
state: &'a SessionState,
payment_data: &mut PaymentData<F>,
storage_scheme: enums::MerchantStorageScheme,
merchant_key_store: &domain::MerchantKeyStore,
customer: &Option<domain::Customer>,
business_profile: Option<&diesel_models::business_profile::BusinessProfile>,
_state: &'a SessionState,
_payment_data: &mut PaymentData<F>,
_storage_scheme: enums::MerchantStorageScheme,
_merchant_key_store: &domain::MerchantKeyStore,
_customer: &Option<domain::Customer>,
_business_profile: Option<&diesel_models::business_profile::BusinessProfile>,
) -> RouterResult<(
BoxedOperation<'a, F, api::PaymentsRetrieveRequest>,
Option<api::PaymentMethodData>,
Option<String>,
)> {
helpers::make_pm_data(
Box::new(self),
state,
payment_data,
merchant_key_store,
customer,
storage_scheme,
business_profile,
)
.await
Ok((Box::new(self), None, None))
}
#[instrument(skip_all)]

View File

@ -85,27 +85,18 @@ impl<F: Clone + Send> Domain<F, api::PaymentsRequest> for PaymentStatus {
#[instrument(skip_all)]
async fn make_pm_data<'a>(
&'a self,
state: &'a SessionState,
payment_data: &mut PaymentData<F>,
storage_scheme: enums::MerchantStorageScheme,
merchant_key_store: &domain::MerchantKeyStore,
customer: &Option<domain::Customer>,
business_profile: Option<&diesel_models::business_profile::BusinessProfile>,
_state: &'a SessionState,
_payment_data: &mut PaymentData<F>,
_storage_scheme: enums::MerchantStorageScheme,
_merchant_key_store: &domain::MerchantKeyStore,
_customer: &Option<domain::Customer>,
_business_profile: Option<&diesel_models::business_profile::BusinessProfile>,
) -> RouterResult<(
BoxedOperation<'a, F, api::PaymentsRequest>,
Option<api::PaymentMethodData>,
Option<String>,
)> {
helpers::make_pm_data(
Box::new(self),
state,
payment_data,
merchant_key_store,
customer,
storage_scheme,
business_profile,
)
.await
Ok((Box::new(self), None, None))
}
#[instrument(skip_all)]