Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Amount Debug impl to BTC with 8 decimals #414

Merged
merged 1 commit into from Feb 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/util/amount.rs
Expand Up @@ -463,7 +463,7 @@ impl Ord 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 @@ -807,7 +807,7 @@ impl Ord 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