ui: refactor amount function

The `amount` function can call `amount_with_size` rather than
repeating the underlying call to `render_amount`.
This commit is contained in:
Michael Mallan 2024-10-07 13:55:43 +01:00
parent 8fb74d1cf9
commit 013feb3909
No known key found for this signature in database
GPG Key ID: 5177CDCEDB0EABEB

View File

@ -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> {