Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit 6c81321

Browse files
committed
Handle other fedimint errors
1 parent 51d5426 commit 6c81321

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

mutiny-core/src/error.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,8 +605,13 @@ impl From<anyhow::Error> for MutinyError {
605605
match e.to_string().as_str() {
606606
"Insufficient balance" => Self::InsufficientBalance,
607607
"MissingInvoiceAmount" => Self::BadAmountError,
608+
"Federation didn't return peg-out fees" => Self::FederationConnectionFailed,
608609
"The generated transaction would be rejected by the federation for being too large." => Self::FederationTxTooLarge,
609-
_ => Self::Other(e),
610+
str => if str.starts_with("Address isn't compatible with the federation's network") {
611+
Self::IncorrectNetwork
612+
} else {
613+
Self::Other(e)
614+
},
610615
}
611616
}
612617
}

0 commit comments

Comments
 (0)