Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit 2538839

Browse files
authored
Add deserialize for TransactionValidityError in std. (#8961)
* Add deserialize for TransactionValidityError in std. * Fix derives
1 parent 6d43761 commit 2538839

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

primitives/runtime/src/transaction_validity.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub type TransactionTag = Vec<u8>;
3333

3434
/// An invalid transaction validity.
3535
#[derive(Clone, PartialEq, Eq, Encode, Decode, Copy, RuntimeDebug)]
36-
#[cfg_attr(feature = "std", derive(serde::Serialize))]
36+
#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))]
3737
pub enum InvalidTransaction {
3838
/// The call of the transaction is not expected.
3939
Call,
@@ -113,7 +113,7 @@ impl From<InvalidTransaction> for &'static str {
113113

114114
/// An unknown transaction validity.
115115
#[derive(Clone, PartialEq, Eq, Encode, Decode, Copy, RuntimeDebug)]
116-
#[cfg_attr(feature = "std", derive(serde::Serialize))]
116+
#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))]
117117
pub enum UnknownTransaction {
118118
/// Could not lookup some information that is required to validate the transaction.
119119
CannotLookup,
@@ -137,7 +137,7 @@ impl From<UnknownTransaction> for &'static str {
137137

138138
/// Errors that can occur while checking the validity of a transaction.
139139
#[derive(Clone, PartialEq, Eq, Encode, Decode, Copy, RuntimeDebug)]
140-
#[cfg_attr(feature = "std", derive(serde::Serialize))]
140+
#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))]
141141
pub enum TransactionValidityError {
142142
/// The transaction is invalid.
143143
Invalid(InvalidTransaction),

0 commit comments

Comments
 (0)