mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 19:17:58 +00:00
Add deserialize for TransactionValidityError in std. (#8961)
* Add deserialize for TransactionValidityError in std. * Fix derives
This commit is contained in:
@@ -33,7 +33,7 @@ pub type TransactionTag = Vec<u8>;
|
||||
|
||||
/// An invalid transaction validity.
|
||||
#[derive(Clone, PartialEq, Eq, Encode, Decode, Copy, RuntimeDebug)]
|
||||
#[cfg_attr(feature = "std", derive(serde::Serialize))]
|
||||
#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))]
|
||||
pub enum InvalidTransaction {
|
||||
/// The call of the transaction is not expected.
|
||||
Call,
|
||||
@@ -113,7 +113,7 @@ impl From<InvalidTransaction> for &'static str {
|
||||
|
||||
/// An unknown transaction validity.
|
||||
#[derive(Clone, PartialEq, Eq, Encode, Decode, Copy, RuntimeDebug)]
|
||||
#[cfg_attr(feature = "std", derive(serde::Serialize))]
|
||||
#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))]
|
||||
pub enum UnknownTransaction {
|
||||
/// Could not lookup some information that is required to validate the transaction.
|
||||
CannotLookup,
|
||||
@@ -137,7 +137,7 @@ impl From<UnknownTransaction> for &'static str {
|
||||
|
||||
/// Errors that can occur while checking the validity of a transaction.
|
||||
#[derive(Clone, PartialEq, Eq, Encode, Decode, Copy, RuntimeDebug)]
|
||||
#[cfg_attr(feature = "std", derive(serde::Serialize))]
|
||||
#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))]
|
||||
pub enum TransactionValidityError {
|
||||
/// The transaction is invalid.
|
||||
Invalid(InvalidTransaction),
|
||||
|
||||
Reference in New Issue
Block a user