Skip to content

Commit

Permalink
Run codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
jessepinho committed Mar 29, 2024
1 parent e84473c commit e5f059b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/proto/src/gen/penumbra.view.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1527,8 +1527,14 @@ impl ::prost::Name for UnbondingTokensByAddressIndexRequest {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnbondingTokensByAddressIndexResponse {
/// A `ValueView` representing the amount of the given unbonding token.
#[prost(message, optional, tag = "1")]
pub value_view: ::core::option::Option<super::super::core::asset::v1::ValueView>,
/// Whether the unbonding token is currently claimable. This will only be
/// `true` if the `unbonding_delay` (from `StakeParameters`) has passed or the
/// validator has unbonded.
#[prost(bool, tag = "2")]
pub claimable: bool,
}
impl ::prost::Name for UnbondingTokensByAddressIndexResponse {
const NAME: &'static str = "UnbondingTokensByAddressIndexResponse";
Expand Down
17 changes: 17 additions & 0 deletions crates/proto/src/gen/penumbra.view.v1.serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7468,10 +7468,16 @@ impl serde::Serialize for UnbondingTokensByAddressIndexResponse {
if self.value_view.is_some() {
len += 1;
}
if self.claimable {
len += 1;
}
let mut struct_ser = serializer.serialize_struct("penumbra.view.v1.UnbondingTokensByAddressIndexResponse", len)?;
if let Some(v) = self.value_view.as_ref() {
struct_ser.serialize_field("valueView", v)?;
}
if self.claimable {
struct_ser.serialize_field("claimable", &self.claimable)?;
}
struct_ser.end()
}
}
Expand All @@ -7484,11 +7490,13 @@ impl<'de> serde::Deserialize<'de> for UnbondingTokensByAddressIndexResponse {
const FIELDS: &[&str] = &[
"value_view",
"valueView",
"claimable",
];

#[allow(clippy::enum_variant_names)]
enum GeneratedField {
ValueView,
Claimable,
__SkipField__,
}
impl<'de> serde::Deserialize<'de> for GeneratedField {
Expand All @@ -7512,6 +7520,7 @@ impl<'de> serde::Deserialize<'de> for UnbondingTokensByAddressIndexResponse {
{
match value {
"valueView" | "value_view" => Ok(GeneratedField::ValueView),
"claimable" => Ok(GeneratedField::Claimable),
_ => Ok(GeneratedField::__SkipField__),
}
}
Expand All @@ -7532,6 +7541,7 @@ impl<'de> serde::Deserialize<'de> for UnbondingTokensByAddressIndexResponse {
V: serde::de::MapAccess<'de>,
{
let mut value_view__ = None;
let mut claimable__ = None;
while let Some(k) = map_.next_key()? {
match k {
GeneratedField::ValueView => {
Expand All @@ -7540,13 +7550,20 @@ impl<'de> serde::Deserialize<'de> for UnbondingTokensByAddressIndexResponse {
}
value_view__ = map_.next_value()?;
}
GeneratedField::Claimable => {
if claimable__.is_some() {
return Err(serde::de::Error::duplicate_field("claimable"));
}
claimable__ = Some(map_.next_value()?);
}
GeneratedField::__SkipField__ => {
let _ = map_.next_value::<serde::de::IgnoredAny>()?;
}
}
}
Ok(UnbondingTokensByAddressIndexResponse {
value_view: value_view__,
claimable: claimable__.unwrap_or_default(),
})
}
}
Expand Down
Binary file modified crates/proto/src/gen/proto_descriptor.bin.no_lfs
Binary file not shown.

0 comments on commit e5f059b

Please sign in to comment.