-
Couldn't load subscription status.
- Fork 23
Open
Description
NOTE: This is a state- and API-breaking change!
The VaultPositionType is defined as
#[cw_serde]
pub enum VaultPositionType {
UNLOCKED,
LOCKED,
UNLOCKING,
}However, all caps names don't work well with JSON serialization. For example, VaultPositionType::UNLOCKED is serialized to JSON string "u_n_l_o_c_k_e_d". Imo, this is undesirable.
To fix this, we can either no longer naming the variants in all caps:
#[cw_serde]
pub enum VaultPositionType {
Unlocked,
Locked,
Unlocking,
}or use #[serde(rename)]:
#[cw_serde]
pub enum VaultPositionType {
#[serde(rename = "unlocked")]
UNLOCKED,
#[serde(rename = "locked")]
LOCKED,
#[serde(rename = "unlocking")]
UNLOCKING,
}Metadata
Metadata
Assignees
Labels
No labels