From 9e280d09057ec1d8481f64b48b24869d325a5574 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Tue, 22 Jul 2025 13:42:07 -0400 Subject: [PATCH] collab: Remove unneeded caching of Stripe price IDs by meter ID (#34915) This PR removes the caching of Stripe price IDs by meter ID on the `StripeBilling` object, as we weren't actually reading them anywhere. Release Notes: - N/A --- crates/collab/src/stripe_billing.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/crates/collab/src/stripe_billing.rs b/crates/collab/src/stripe_billing.rs index 707928d5cd8952cda154531fd9c4d2e21d661f0e..50accf9557201a586079014a3a7dbcfc452f2905 100644 --- a/crates/collab/src/stripe_billing.rs +++ b/crates/collab/src/stripe_billing.rs @@ -30,7 +30,6 @@ pub struct StripeBilling { #[derive(Default)] struct StripeBillingState { - price_ids_by_meter_id: HashMap, prices_by_lookup_key: HashMap, } @@ -63,13 +62,7 @@ impl StripeBilling { for price in prices { if let Some(lookup_key) = price.lookup_key.clone() { - state.prices_by_lookup_key.insert(lookup_key, price.clone()); - } - - if let Some(recurring) = price.recurring { - if let Some(meter) = recurring.meter { - state.price_ids_by_meter_id.insert(meter, price.id); - } + state.prices_by_lookup_key.insert(lookup_key, price); } }