mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 10:27:59 +00:00
Fix transaction payment runtime api (#6792)
The transaction payment runtime api used its own extrinsic generic parameter. This is wrong, because this resulted in using always the native extrinsic. If there was a runtime upgrade that changed the extrinsic in some way, it would result in the api breaking. The correct way is to use the `Extrinsic` from the `Block` parameter. This is on the node side the opaque extrinsic and on the runtime side the real extrinsic.
This commit is contained in:
@@ -56,11 +56,10 @@ fn deserialize_from_string<'de, D: Deserializer<'de>, T: std::str::FromStr>(dese
|
||||
}
|
||||
|
||||
sp_api::decl_runtime_apis! {
|
||||
pub trait TransactionPaymentApi<Balance, Extrinsic> where
|
||||
pub trait TransactionPaymentApi<Balance> where
|
||||
Balance: Codec + MaybeDisplay + MaybeFromStr,
|
||||
Extrinsic: Codec,
|
||||
{
|
||||
fn query_info(uxt: Extrinsic, len: u32) -> RuntimeDispatchInfo<Balance>;
|
||||
fn query_info(uxt: Block::Extrinsic, len: u32) -> RuntimeDispatchInfo<Balance>;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user