diff --git a/src/nwc_keysend.rs b/src/nwc_keysend.rs index 8cc8f39..aec724d 100644 --- a/src/nwc_keysend.rs +++ b/src/nwc_keysend.rs @@ -199,7 +199,11 @@ async fn keysend( for tlv in ¶ms.tlv_records { extratlvs.entries.push(TlvEntry { typ: tlv.tlv_type, - value: tlv.value.as_bytes().to_owned(), + value: hex::decode(&tlv.value).map_err(|e| RpcError { + code: Some(-32700), + message: format!("Could not decode tlv bytes: {e}"), + data: None, + })?, }); } let extratlvs = if extratlvs.entries.is_empty() {