From 0511a14bd9dee57d36181bebb1987a566bf1c1d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-Xavier=20Talbot?= <108630700+fetchfern@users.noreply.github.com> Date: Thu, 4 Sep 2025 13:28:22 +0100 Subject: [PATCH] Fix tremendous balance check (#4337) --- apps/labrinth/src/queue/payouts.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/labrinth/src/queue/payouts.rs b/apps/labrinth/src/queue/payouts.rs index d814bf9c..e2d448b8 100644 --- a/apps/labrinth/src/queue/payouts.rs +++ b/apps/labrinth/src/queue/payouts.rs @@ -651,8 +651,8 @@ impl PayoutsQueue { ) -> Result, ApiError> { #[derive(Deserialize)] struct FundingSourceMeta { - available_cents: u64, - pending_cents: u64, + available_cents: Option, + pending_cents: Option, } #[derive(Deserialize)] @@ -679,9 +679,9 @@ impl PayoutsQueue { .into_iter() .find(|x| x.method == "balance") .map(|x| AccountBalance { - available: Decimal::from(x.meta.available_cents) + available: Decimal::from(x.meta.available_cents.unwrap_or(0)) / Decimal::from(100), - pending: Decimal::from(x.meta.pending_cents) + pending: Decimal::from(x.meta.pending_cents.unwrap_or(0)) / Decimal::from(100), })) }