Skip to content

Commit b014a8c

Browse files
authored
Remove transactional (#800)
* remove transactional * revert require_transactional
1 parent 20969f3 commit b014a8c

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

payments/src/lib.rs

+1-9
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ pub mod pallet {
7373
};
7474
use frame_support::{
7575
dispatch::DispatchResultWithPostInfo, fail, pallet_prelude::*, require_transactional,
76-
storage::bounded_btree_map::BoundedBTreeMap, traits::tokens::BalanceStatus, transactional,
76+
storage::bounded_btree_map::BoundedBTreeMap, traits::tokens::BalanceStatus,
7777
};
7878
use frame_system::pallet_prelude::*;
7979
use orml_traits::{MultiCurrency, MultiReservableCurrency};
@@ -279,7 +279,6 @@ pub mod pallet {
279279
/// the option to add a remark, this remark can then be used to run
280280
/// custom logic and trigger alternate payment flows. the specified
281281
/// amount.
282-
#[transactional]
283282
#[pallet::weight(T::WeightInfo::pay(T::MaxRemarkLength::get()))]
284283
pub fn pay(
285284
origin: OriginFor<T>,
@@ -314,7 +313,6 @@ pub mod pallet {
314313

315314
/// Release any created payment, this will transfer the reserved amount
316315
/// from the creator of the payment to the assigned recipient
317-
#[transactional]
318316
#[pallet::weight(T::WeightInfo::release())]
319317
pub fn release(origin: OriginFor<T>, to: T::AccountId) -> DispatchResultWithPostInfo {
320318
let from = ensure_signed(origin)?;
@@ -333,7 +331,6 @@ pub mod pallet {
333331
/// Cancel a payment in created state, this will release the reserved
334332
/// back to creator of the payment. This extrinsic can only be called by
335333
/// the recipient of the payment
336-
#[transactional]
337334
#[pallet::weight(T::WeightInfo::cancel())]
338335
pub fn cancel(origin: OriginFor<T>, creator: T::AccountId) -> DispatchResultWithPostInfo {
339336
let who = ensure_signed(origin)?;
@@ -356,7 +353,6 @@ pub mod pallet {
356353
/// recipient of the payment.
357354
/// This extrinsic allows the assigned judge to
358355
/// cancel/release/partial_release the payment.
359-
#[transactional]
360356
#[pallet::weight(T::WeightInfo::resolve_payment())]
361357
pub fn resolve_payment(
362358
origin: OriginFor<T>,
@@ -392,7 +388,6 @@ pub mod pallet {
392388
/// Allow the creator of a payment to initiate a refund that will return
393389
/// the funds after a configured amount of time that the reveiver has to
394390
/// react and opose the request
395-
#[transactional]
396391
#[pallet::weight(T::WeightInfo::request_refund())]
397392
pub fn request_refund(origin: OriginFor<T>, recipient: T::AccountId) -> DispatchResultWithPostInfo {
398393
let who = ensure_signed(origin)?;
@@ -440,7 +435,6 @@ pub mod pallet {
440435
/// payment creator This does not cancel the request, instead sends the
441436
/// payment to a NeedsReview state The assigned resolver account can
442437
/// then change the state of the payment after review.
443-
#[transactional]
444438
#[pallet::weight(T::WeightInfo::dispute_refund())]
445439
pub fn dispute_refund(origin: OriginFor<T>, creator: T::AccountId) -> DispatchResultWithPostInfo {
446440
use PaymentState::*;
@@ -487,7 +481,6 @@ pub mod pallet {
487481
// using the `accept_and_pay` extrinsic. The payment will be in
488482
// PaymentRequested State and can only be modified by the `accept_and_pay`
489483
// extrinsic.
490-
#[transactional]
491484
#[pallet::weight(T::WeightInfo::request_payment())]
492485
pub fn request_payment(
493486
origin: OriginFor<T>,
@@ -516,7 +509,6 @@ pub mod pallet {
516509
// This extrinsic allows the sender to fulfill a payment request created by a
517510
// recipient. The amount will be transferred to the recipient and payment
518511
// removed from storage
519-
#[transactional]
520512
#[pallet::weight(T::WeightInfo::accept_and_pay())]
521513
pub fn accept_and_pay(origin: OriginFor<T>, to: T::AccountId) -> DispatchResultWithPostInfo {
522514
let from = ensure_signed(origin)?;

xtokens/src/lib.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use frame_support::{
2929
pallet_prelude::*,
3030
require_transactional,
3131
traits::{Contains, Get},
32-
transactional, Parameter,
32+
Parameter,
3333
};
3434
use frame_system::{ensure_signed, pallet_prelude::*};
3535
use sp_runtime::{
@@ -200,7 +200,6 @@ pub mod module {
200200
/// by the network, and if the receiving chain would handle
201201
/// messages correctly.
202202
#[pallet::weight(Pallet::<T>::weight_of_transfer(currency_id.clone(), *amount, dest))]
203-
#[transactional]
204203
pub fn transfer(
205204
origin: OriginFor<T>,
206205
currency_id: T::CurrencyId,
@@ -226,7 +225,6 @@ pub mod module {
226225
/// by the network, and if the receiving chain would handle
227226
/// messages correctly.
228227
#[pallet::weight(Pallet::<T>::weight_of_transfer_multiasset(asset, dest))]
229-
#[transactional]
230228
pub fn transfer_multiasset(
231229
origin: OriginFor<T>,
232230
asset: Box<VersionedMultiAsset>,
@@ -261,7 +259,6 @@ pub mod module {
261259
/// by the network, and if the receiving chain would handle
262260
/// messages correctly.
263261
#[pallet::weight(Pallet::<T>::weight_of_transfer(currency_id.clone(), *amount, dest))]
264-
#[transactional]
265262
pub fn transfer_with_fee(
266263
origin: OriginFor<T>,
267264
currency_id: T::CurrencyId,
@@ -298,7 +295,6 @@ pub mod module {
298295
/// by the network, and if the receiving chain would handle
299296
/// messages correctly.
300297
#[pallet::weight(Pallet::<T>::weight_of_transfer_multiasset(asset, dest))]
301-
#[transactional]
302298
pub fn transfer_multiasset_with_fee(
303299
origin: OriginFor<T>,
304300
asset: Box<VersionedMultiAsset>,
@@ -330,7 +326,6 @@ pub mod module {
330326
/// by the network, and if the receiving chain would handle
331327
/// messages correctly.
332328
#[pallet::weight(Pallet::<T>::weight_of_transfer_multicurrencies(currencies, fee_item, dest))]
333-
#[transactional]
334329
pub fn transfer_multicurrencies(
335330
origin: OriginFor<T>,
336331
currencies: Vec<(T::CurrencyId, T::Balance)>,
@@ -360,7 +355,6 @@ pub mod module {
360355
/// by the network, and if the receiving chain would handle
361356
/// messages correctly.
362357
#[pallet::weight(Pallet::<T>::weight_of_transfer_multiassets(assets, fee_item, dest))]
363-
#[transactional]
364358
pub fn transfer_multiassets(
365359
origin: OriginFor<T>,
366360
assets: Box<VersionedMultiAssets>,

0 commit comments

Comments
 (0)