mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-11-04 18:01:07 +00:00
Improve PaysFee trait and dispatch info logic in utility module (#4606)
* pass target to PaysFee trait and allow batch call to be free if all its calls are free * bump version * fix error
This commit is contained in:
1 parent
af4ddd2dff
commit
507909c3be
6 files changed
+39
-29
No files matched your search
@@ -1312,8 +1312,9 @@ macro_rules! decl_module {
|
||||
&$weight,
|
||||
($( $param_name, )*)
|
||||
);
|
||||
let pays_fee = <dyn $crate::dispatch::PaysFee>::pays_fee(
|
||||
&$weight
|
||||
let pays_fee = <dyn $crate::dispatch::PaysFee<( $( & $param, )* )>>::pays_fee(
|
||||
&$weight,
|
||||
($( $param_name, )*)
|
||||
);
|
||||
return $crate::dispatch::DispatchInfo { weight, class, pays_fee };
|
||||
}
|
||||
@@ -1331,8 +1332,9 @@ macro_rules! decl_module {
|
||||
&$crate::dispatch::SimpleDispatchInfo::default(),
|
||||
()
|
||||
);
|
||||
let pays_fee = <dyn $crate::dispatch::PaysFee>::pays_fee(
|
||||
&$crate::dispatch::SimpleDispatchInfo::default()
|
||||
let pays_fee = <dyn $crate::dispatch::PaysFee<_>>::pays_fee(
|
||||
&$crate::dispatch::SimpleDispatchInfo::default(),
|
||||
()
|
||||
);
|
||||
$crate::dispatch::DispatchInfo { weight, class, pays_fee }
|
||||
|
||||
|
||||
Reference in new issue
Block a user