diff --git a/pallets/payments/src/lib.rs b/pallets/payments/src/lib.rs index ca8c6115..be7452b3 100644 --- a/pallets/payments/src/lib.rs +++ b/pallets/payments/src/lib.rs @@ -158,7 +158,7 @@ pub mod pallet { _, ( NMapKey, - NMapKey, + // NMapKey, NMapKey, ), PaymentDetail, @@ -313,18 +313,17 @@ pub mod pallet { #[pallet::weight(::WeightInfo::release())] pub fn release( origin: OriginFor, - beneficiary: AccountIdLookupOf, + // beneficiary: AccountIdLookupOf, payment_id: T::PaymentId, ) -> DispatchResultWithPostInfo { let sender = ensure_signed(origin)?; - let beneficiary = T::Lookup::lookup(beneficiary)?; + // let beneficiary = T::Lookup::lookup(beneficiary)?; // ensure the payment is in Created state - let payment = - Payment::::get((&sender, &beneficiary, &payment_id)).map_err(|_| Error::::InvalidPayment)?; + let payment = Payment::::get((&sender, &payment_id)).map_err(|_| Error::::InvalidPayment)?; ensure!(payment.state == PaymentState::Created, Error::::InvalidAction); - Self::settle_payment(&sender, &beneficiary, &payment_id, None)?; + Self::settle_payment(&sender, &payment_id, None)?; Self::deposit_event(Event::PaymentReleased { sender, beneficiary }); Ok(().into())