Improve error handling in account balance notifications (#6478)

* Improve error handling in account balance notifications

* fix compile
This commit is contained in:
aecsocket
2026-06-23 21:11:02 +00:00
committed by GitHub
parent 6380dd16d5
commit 7bf85239de
4 changed files with 57 additions and 26 deletions
+4 -4
View File
@@ -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()