Skip to content

Commit

Permalink
Merge pull request #414 from stevenroose/amount-debug
Browse files Browse the repository at this point in the history
Change Amount Debug impl to BTC with 8 decimals
  • Loading branch information
sgeisler committed Feb 21, 2021
2 parents c4f339f + 6186ee6 commit 3ecab20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util/amount.rs
Expand Up @@ -433,7 +433,7 @@ impl default::Default for Amount {

impl fmt::Debug for Amount {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "Amount({} satoshi)", self.as_sat())
write!(f, "Amount({:.8} BTC)", self.as_btc())
}
}

Expand Down Expand Up @@ -758,7 +758,7 @@ impl default::Default for SignedAmount {

impl fmt::Debug for SignedAmount {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "SignedAmount({} satoshi)", self.as_sat())
write!(f, "SignedAmount({:.8} BTC)", self.as_btc())
}
}

Expand Down

0 comments on commit 3ecab20

Please sign in to comment.