From 34e3049ae0ebe15f24be771f0ece3c72ee46ce5c Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Fri, 24 Jan 2025 11:36:32 +1100 Subject: [PATCH] Use sats instead of satoshi No one says that, just use `sats`. Internal change only. --- units/src/amount/unsigned.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/units/src/amount/unsigned.rs b/units/src/amount/unsigned.rs index d3c494921..0cc4a4356 100644 --- a/units/src/amount/unsigned.rs +++ b/units/src/amount/unsigned.rs @@ -152,19 +152,19 @@ impl Amount { /// /// If the amount is too big, too precise or negative. pub fn from_str_in(s: &str, denom: Denomination) -> Result { - let (negative, satoshi) = + let (negative, sats) = parse_signed_to_satoshi(s, denom).map_err(|error| error.convert(false))?; if negative { return Err(ParseAmountError(ParseAmountErrorInner::OutOfRange( OutOfRangeError::negative(), ))); } - if satoshi > Self::MAX.0 { + if sats > Self::MAX.0 { return Err(ParseAmountError(ParseAmountErrorInner::OutOfRange( OutOfRangeError::too_big(false), ))); } - Ok(Amount::from_sat(satoshi)) + Ok(Amount::from_sat(sats)) } /// Parses amounts with denomination suffix as produced by [`Self::to_string_with_denomination`]