feature: impl Default for eip2718::TypedTransaction (#646)
This commit is contained in:
parent
437f9de92f
commit
0f6d3688c2
|
@ -34,6 +34,20 @@ pub enum TypedTransaction {
|
||||||
Eip1559(Eip1559TransactionRequest),
|
Eip1559(Eip1559TransactionRequest),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "legacy")]
|
||||||
|
impl Default for TypedTransaction {
|
||||||
|
fn default() -> Self {
|
||||||
|
TypedTransaction::Legacy(Default::default())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(not(feature = "legacy"))]
|
||||||
|
impl Default for TypedTransaction {
|
||||||
|
fn default() -> Self {
|
||||||
|
TypedTransaction::Eip1559(Default::default())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
use TypedTransaction::*;
|
use TypedTransaction::*;
|
||||||
|
|
||||||
impl TypedTransaction {
|
impl TypedTransaction {
|
||||||
|
|
Loading…
Reference in New Issue