mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 18:21:02 +00:00
adjust to merge conflicts and tests
This commit is contained in:
@@ -674,6 +674,8 @@ impl<'a, T: Config> ExtrinsicSignedExtensions<'a, T> {
|
||||
Some(signed_extension)
|
||||
}
|
||||
|
||||
/// Searches through all signed extensions to find a specific one.
|
||||
/// If the Signed Extension is found, but decoding failed, `Some(Err(err))` is returned.
|
||||
pub fn find<S: SignedExtension<T>>(&self) -> Option<Result<S::Extra, Error>> {
|
||||
let signed_extension = self.find_by_name(S::NAME)?;
|
||||
Some(signed_extension.as_type().map_err(Into::into))
|
||||
@@ -734,6 +736,7 @@ impl<'a, T: Config> ExtrinsicSignedExtension<'a, T> {
|
||||
self.decoded()?.to_value()
|
||||
}
|
||||
|
||||
/// Decodes the Signed Extension into a static type.
|
||||
pub fn as_type<E: DecodeAsType>(&self) -> Result<E, Error> {
|
||||
self.decoded()?.as_type::<E>().map_err(Into::into)
|
||||
}
|
||||
|
||||
@@ -276,8 +276,10 @@ impl<T: Config> SignedExtension<T> for CheckMortality<T> {
|
||||
/// The [`ChargeAssetTxPayment`] signed extension.
|
||||
#[derive(Debug, Encode, Decode, DecodeAsType)]
|
||||
pub struct ChargeAssetTxPayment {
|
||||
tip: Compact<u128>,
|
||||
asset_id: Option<u32>,
|
||||
/// Tip
|
||||
pub tip: Compact<u128>,
|
||||
/// Asset Id
|
||||
pub asset_id: Option<u32>,
|
||||
}
|
||||
|
||||
/// Parameters to configure the [`ChargeAssetTxPayment`] signed extension.
|
||||
@@ -347,6 +349,7 @@ impl<T: Config> SignedExtension<T> for ChargeAssetTxPayment {
|
||||
/// The [`ChargeTransactionPayment`] signed extension.
|
||||
#[derive(Debug, Encode, Decode, DecodeAsType)]
|
||||
pub struct ChargeTransactionPayment {
|
||||
/// Tip
|
||||
tip: Compact<u128>,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user