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 18, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 540c8a3 commit 02752b8
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;

@@ -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(),
}
}
}

0 comments on commit 02752b8

Please sign in to comment.