diff --git a/apps/labrinth/src/queue/payouts/mod.rs b/apps/labrinth/src/queue/payouts/mod.rs index 02244cc9..2f8af3a5 100644 --- a/apps/labrinth/src/queue/payouts/mod.rs +++ b/apps/labrinth/src/queue/payouts/mod.rs @@ -838,6 +838,8 @@ async fn get_tremendous_payout_methods( "merchant_card", "bank", "charity", + "visa", + "visa_card", "paypal", "venmo", ]; @@ -1441,6 +1443,12 @@ pub async fn insert_bank_balances_and_webhook( tremendous_result, ) .await?; + check_balance_with_webhook( + "mural", + "MURAL_BALANCE_ALERT_THRESHOLD", + mural_result, + ) + .await?; } transaction.commit().await?; diff --git a/apps/labrinth/src/queue/payouts/mural.rs b/apps/labrinth/src/queue/payouts/mural.rs index ef4739ab..a91960bb 100644 --- a/apps/labrinth/src/queue/payouts/mural.rs +++ b/apps/labrinth/src/queue/payouts/mural.rs @@ -148,19 +148,22 @@ impl PayoutsQueue { Ok(()) } - pub async fn get_mural_balance(&self) -> Result> { + pub async fn get_mural_balance( + &self, + ) -> Result, ApiError> { let muralpay = self.muralpay.load(); let muralpay = muralpay .as_ref() - .wrap_err("Mural Pay client not available")?; + .wrap_internal_err("Mural Pay client not available")?; let account = muralpay .client .get_account(muralpay.source_account_id) - .await?; + .await + .wrap_internal_err("failed to get source account")?; let details = account .account_details - .wrap_err("source account does not have details")?; + .wrap_internal_err("source account does not have details")?; let available = details .balances .iter()