Skip to content

Commit

Permalink
fix: enums exposed over RPC should use camelCase
Browse files Browse the repository at this point in the history
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
  • Loading branch information
gregdhill committed Jul 28, 2022
1 parent ad028c2 commit 17457da
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions primitives/src/lib.rs
Expand Up @@ -93,6 +93,7 @@ pub mod issue {

#[derive(Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen)]
#[cfg_attr(feature = "std", derive(Debug, Serialize, Deserialize))]
#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))]
pub enum IssueRequestStatus {
/// opened, but not yet executed or cancelled
Pending,
Expand Down Expand Up @@ -167,6 +168,7 @@ pub mod redeem {

#[derive(Encode, Decode, Clone, Eq, PartialEq, TypeInfo, MaxEncodedLen)]
#[cfg_attr(feature = "std", derive(Debug, Serialize, Deserialize))]
#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))]
pub enum RedeemRequestStatus {
/// opened, but not yet executed or cancelled
Pending,
Expand Down Expand Up @@ -271,6 +273,7 @@ pub mod replace {

#[derive(Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen)]
#[cfg_attr(feature = "std", derive(Debug, Serialize, Deserialize, Eq))]
#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))]
pub enum ReplaceRequestStatus {
/// accepted, but not yet executed or cancelled
Pending,
Expand Down Expand Up @@ -330,6 +333,8 @@ pub mod oracle {
use super::*;

#[derive(Encode, Decode, Clone, Eq, PartialEq, Debug, TypeInfo, MaxEncodedLen)]
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))]
pub enum Key {
ExchangeRate(CurrencyId),
FeeEstimation,
Expand Down Expand Up @@ -489,6 +494,7 @@ create_currency_id! {

#[derive(Encode, Decode, Eq, Hash, PartialEq, Copy, Clone, RuntimeDebug, PartialOrd, Ord, TypeInfo, MaxEncodedLen)]
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))]
pub enum CurrencyId {
Token(TokenSymbol),
ForeignAsset(ForeignAssetId),
Expand Down

0 comments on commit 17457da

Please sign in to comment.