Skip to content

Commit

Permalink
Change DecCoin constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
chipshort committed Oct 4, 2023
1 parent 78bec97 commit f7e06b7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/std/src/query/distribution.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};

use crate::Addr;
use crate::{Addr, Decimal256};

use super::query_response::QueryResponseType;

Expand Down Expand Up @@ -63,14 +63,14 @@ pub struct DecCoin {
///
/// Some chains have choosen atto (10^-18) for their token's base denomination. If we used `Decimal` here, we could only store
/// 340282366920938463463.374607431768211455atoken which is 340.28 TOKEN.
pub amount: crate::Decimal256,
pub amount: Decimal256,
}

impl DecCoin {
pub fn new(amount: crate::Decimal256, denom: impl Into<String>) -> Self {
pub fn new(amount: impl Into<Decimal256>, denom: impl Into<String>) -> Self {
Self {
denom: denom.into(),
amount,
amount: amount.into(),
}
}
}
Expand Down

0 comments on commit f7e06b7

Please sign in to comment.