diff --git a/mutiny-core/src/nostr/nwc.rs b/mutiny-core/src/nostr/nwc.rs index 92676d734..979319764 100644 --- a/mutiny-core/src/nostr/nwc.rs +++ b/mutiny-core/src/nostr/nwc.rs @@ -1038,10 +1038,16 @@ impl NostrWalletConnect { } } + let code = if e == MutinyError::InsufficientBalance { + ErrorCode::InsufficientBalance + } else { + ErrorCode::PaymentFailed + }; + Response { result_type: Method::PayInvoice, error: Some(NIP47Error { - code: ErrorCode::InsufficientBalance, + code, message: format!("Failed to pay invoice: {e}"), }), result: None,