Skip to content

Commit

Permalink
refactor: rename maximum -> max
Browse files Browse the repository at this point in the history
  • Loading branch information
bodymindarts committed Mar 27, 2024
1 parent 54b93c5 commit 7057976
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/api/server/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl From<SpendingPolicy> 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),
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/profile/entity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl Profile {
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SpendingPolicy {
pub allowed_payout_addresses: Vec<Address>,
pub maximum_payout: Option<Satoshis>,
pub max_payout: Option<Satoshis>,
}

impl SpendingPolicy {
Expand All @@ -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)
}
}

Expand Down

0 comments on commit 7057976

Please sign in to comment.