You've already forked AstralRinth
forked from didirus/AstralRinth
Address withdrawal QA changes (#4711)
* Add Mural to balance monitoring * Add back Visa prepaid Tremendous cards * cargo sqlx prepare
This commit is contained in:
@@ -838,6 +838,8 @@ async fn get_tremendous_payout_methods(
|
|||||||
"merchant_card",
|
"merchant_card",
|
||||||
"bank",
|
"bank",
|
||||||
"charity",
|
"charity",
|
||||||
|
"visa",
|
||||||
|
"visa_card",
|
||||||
"paypal",
|
"paypal",
|
||||||
"venmo",
|
"venmo",
|
||||||
];
|
];
|
||||||
@@ -1441,6 +1443,12 @@ pub async fn insert_bank_balances_and_webhook(
|
|||||||
tremendous_result,
|
tremendous_result,
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
check_balance_with_webhook(
|
||||||
|
"mural",
|
||||||
|
"MURAL_BALANCE_ALERT_THRESHOLD",
|
||||||
|
mural_result,
|
||||||
|
)
|
||||||
|
.await?;
|
||||||
}
|
}
|
||||||
|
|
||||||
transaction.commit().await?;
|
transaction.commit().await?;
|
||||||
|
|||||||
@@ -148,19 +148,22 @@ impl PayoutsQueue {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn get_mural_balance(&self) -> Result<Option<AccountBalance>> {
|
pub async fn get_mural_balance(
|
||||||
|
&self,
|
||||||
|
) -> Result<Option<AccountBalance>, ApiError> {
|
||||||
let muralpay = self.muralpay.load();
|
let muralpay = self.muralpay.load();
|
||||||
let muralpay = muralpay
|
let muralpay = muralpay
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.wrap_err("Mural Pay client not available")?;
|
.wrap_internal_err("Mural Pay client not available")?;
|
||||||
|
|
||||||
let account = muralpay
|
let account = muralpay
|
||||||
.client
|
.client
|
||||||
.get_account(muralpay.source_account_id)
|
.get_account(muralpay.source_account_id)
|
||||||
.await?;
|
.await
|
||||||
|
.wrap_internal_err("failed to get source account")?;
|
||||||
let details = account
|
let details = account
|
||||||
.account_details
|
.account_details
|
||||||
.wrap_err("source account does not have details")?;
|
.wrap_internal_err("source account does not have details")?;
|
||||||
let available = details
|
let available = details
|
||||||
.balances
|
.balances
|
||||||
.iter()
|
.iter()
|
||||||
|
|||||||
Reference in New Issue
Block a user