From 013feb3909ebed0a8850a51a7d61383f327b5d4d Mon Sep 17 00:00:00 2001 From: Michael Mallan Date: Mon, 7 Oct 2024 13:55:43 +0100 Subject: [PATCH] ui: refactor amount function The `amount` function can call `amount_with_size` rather than repeating the underlying call to `render_amount`. --- gui/ui/src/component/amount.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/ui/src/component/amount.rs b/gui/ui/src/component/amount.rs index 1e64c768..78ca2ec7 100644 --- a/gui/ui/src/component/amount.rs +++ b/gui/ui/src/component/amount.rs @@ -3,7 +3,7 @@ pub use bitcoin::Amount; use crate::{color, component::text::*, widget::*}; pub fn amount<'a, T: 'a>(a: &Amount) -> Row<'a, T> { - render_amount(amount_as_string(*a), P1_SIZE) + amount_with_size(a, P1_SIZE) } pub fn amount_with_size<'a, T: 'a>(a: &Amount, size: u16) -> Row<'a, T> {