From 7057976e59a388d728b26d8e5d0827b2e0e0f2b0 Mon Sep 17 00:00:00 2001 From: bodymindarts Date: Wed, 27 Mar 2024 22:03:22 +0100 Subject: [PATCH] refactor: rename maximum -> max --- src/api/server/convert.rs | 2 +- src/profile/entity.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/server/convert.rs b/src/api/server/convert.rs index 6703890b..a49231e0 100644 --- a/src/api/server/convert.rs +++ b/src/api/server/convert.rs @@ -38,7 +38,7 @@ impl From for proto::SpendingPolicy { .into_iter() .map(|addr| addr.to_string()) .collect(), - max_payout_sats: sp.maximum_payout.map(u64::from), + max_payout_sats: sp.max_payout.map(u64::from), } } } diff --git a/src/profile/entity.rs b/src/profile/entity.rs index da30f03f..acd26bee 100644 --- a/src/profile/entity.rs +++ b/src/profile/entity.rs @@ -63,7 +63,7 @@ impl Profile { #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct SpendingPolicy { pub allowed_payout_addresses: Vec
, - pub maximum_payout: Option, + pub max_payout: Option, } impl SpendingPolicy { @@ -73,7 +73,7 @@ impl SpendingPolicy { } fn is_amount_allowed(&self, amount: Satoshis) -> bool { - self.maximum_payout.map(|max| amount <= max).unwrap_or(true) + self.max_payout.map(|max| amount <= max).unwrap_or(true) } }