fix(core): prevent chain_id from serializing for requests (#879)
* fix(core): prevent chain_id from serializing * add default chainid for deserialization
This commit is contained in:
parent
a0568fe44e
commit
ce0396ea18
|
@ -58,7 +58,8 @@ pub struct Eip1559TransactionRequest {
|
||||||
/// baseFeePerGas + maxPriorityFeePerGas is “refunded” to the user.
|
/// baseFeePerGas + maxPriorityFeePerGas is “refunded” to the user.
|
||||||
pub max_fee_per_gas: Option<U256>,
|
pub max_fee_per_gas: Option<U256>,
|
||||||
|
|
||||||
#[serde(rename = "chainId", default, skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing)]
|
||||||
|
#[serde(default, rename = "chainId")]
|
||||||
/// Chain ID (None for mainnet)
|
/// Chain ID (None for mainnet)
|
||||||
pub chain_id: Option<U64>,
|
pub chain_id: Option<U64>,
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,8 @@ pub struct TransactionRequest {
|
||||||
pub nonce: Option<U256>,
|
pub nonce: Option<U256>,
|
||||||
|
|
||||||
/// Chain ID (None for mainnet)
|
/// Chain ID (None for mainnet)
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing)]
|
||||||
|
#[serde(default, rename = "chainId")]
|
||||||
pub chain_id: Option<U64>,
|
pub chain_id: Option<U64>,
|
||||||
|
|
||||||
///////////////// Celo-specific transaction fields /////////////////
|
///////////////// Celo-specific transaction fields /////////////////
|
||||||
|
|
Loading…
Reference in New Issue