mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 20:21:06 +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.
|
/// An invalid transaction validity.
|
||||||
#[derive(Clone, PartialEq, Eq, Encode, Decode, Copy, RuntimeDebug)]
|
#[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 {
|
pub enum InvalidTransaction {
|
||||||
/// The call of the transaction is not expected.
|
/// The call of the transaction is not expected.
|
||||||
Call,
|
Call,
|
||||||
@@ -113,7 +113,7 @@ impl From<InvalidTransaction> for &'static str {
|
|||||||
|
|
||||||
/// An unknown transaction validity.
|
/// An unknown transaction validity.
|
||||||
#[derive(Clone, PartialEq, Eq, Encode, Decode, Copy, RuntimeDebug)]
|
#[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 {
|
pub enum UnknownTransaction {
|
||||||
/// Could not lookup some information that is required to validate the transaction.
|
/// Could not lookup some information that is required to validate the transaction.
|
||||||
CannotLookup,
|
CannotLookup,
|
||||||
@@ -137,7 +137,7 @@ impl From<UnknownTransaction> for &'static str {
|
|||||||
|
|
||||||
/// Errors that can occur while checking the validity of a transaction.
|
/// Errors that can occur while checking the validity of a transaction.
|
||||||
#[derive(Clone, PartialEq, Eq, Encode, Decode, Copy, RuntimeDebug)]
|
#[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 {
|
pub enum TransactionValidityError {
|
||||||
/// The transaction is invalid.
|
/// The transaction is invalid.
|
||||||
Invalid(InvalidTransaction),
|
Invalid(InvalidTransaction),
|
||||||
|
|||||||
Reference in New Issue
Block a user