use serde::Deserialize;
use std::fmt::{self, Display};
#[derive(Clone, Debug, Deserialize)]
pub struct Coin {
pub denom: Denom,
pub amount: Amount,
}
#[derive(Clone, Debug, Deserialize)]
pub struct Denom(String);
impl AsRef<str> for Denom {
fn as_ref(&self) -> &str {
self.0.as_ref()
}
}
impl Display for Denom {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
self.0.fmt(f)
}
}
#[derive(Clone, Debug, Deserialize)]
pub struct Amount(String);
impl Display for Amount {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
self.0.fmt(f)
}
}