mirror of
https://github.com/daywalker90/cln-nip47.git
synced 2026-08-13 12:33:43 +02:00
return error on unsupported invoice type lookup for holdinvoices
This commit is contained in:
parent
1ada5bd268
commit
0762eb4c5d
1 changed files with 6 additions and 1 deletions
|
|
@ -288,7 +288,12 @@ async fn get_and_decode_holdinvoice(
|
|||
let ph = match invoice_decoded.item_type {
|
||||
DecodeType::BOLT12_INVOICE => invoice_decoded.invoice_payment_hash.unwrap(),
|
||||
DecodeType::BOLT11_INVOICE => invoice_decoded.payment_hash.unwrap().to_string(),
|
||||
_ => todo!(),
|
||||
_ => {
|
||||
return Err(nip47::NIP47Error {
|
||||
code: nip47::ErrorCode::Other,
|
||||
message: "Not a supported invoice type".to_owned(),
|
||||
});
|
||||
}
|
||||
};
|
||||
let payment_hash_hash = match hex::decode(&ph) {
|
||||
Ok(p) => p,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue