Merge pull request #414 from stevenroose/amount-debug

Change Amount Debug impl to BTC with 8 decimals
This commit is contained in:
Sebastian 2021-02-21 15:14:40 +01:00 committed by GitHub
commit 3ecab20c17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

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