mirror of
https://github.com/modrinth/code.git
synced 2026-08-27 18:14:49 +00:00
Improve error handling in account balance notifications (#6478)
* Improve error handling in account balance notifications * fix compile
This commit is contained in:
@@ -106,20 +106,20 @@ impl PayoutsQueue {
|
||||
|
||||
pub async fn get_mural_balance(
|
||||
&self,
|
||||
) -> Result<Option<AccountBalance>, ApiError> {
|
||||
) -> eyre::Result<Option<AccountBalance>> {
|
||||
let muralpay = self.muralpay.load();
|
||||
let muralpay = muralpay
|
||||
.as_ref()
|
||||
.wrap_internal_err("Mural Pay client not available")?;
|
||||
.wrap_err("Mural Pay client not available")?;
|
||||
|
||||
let account = muralpay
|
||||
.client
|
||||
.get_account(muralpay.source_account_id)
|
||||
.await
|
||||
.wrap_internal_err("failed to get source account")?;
|
||||
.wrap_err("failed to get source account")?;
|
||||
let details = account
|
||||
.account_details
|
||||
.wrap_internal_err("source account does not have details")?;
|
||||
.wrap_err("source account does not have details")?;
|
||||
let available = details
|
||||
.balances
|
||||
.iter()
|
||||
|
||||
Reference in New Issue
Block a user