Dont process non-nwc messages to db

This commit is contained in:
Tony Giorgio
2023-08-11 17:03:40 -05:00
parent ef5c67f14a
commit a40fc835cb

View File

@@ -137,6 +137,13 @@ pub async fn get_nwc_events(keys: &[String], kind: Kind, db: &D1Database) -> Res
} }
pub async fn handle_nwc_event(event: Event, db: &D1Database) -> Result<Option<RelayMessage>> { pub async fn handle_nwc_event(event: Event, db: &D1Database) -> Result<Option<RelayMessage>> {
// Determine the event kind
match event.kind {
Kind::WalletConnectResponse => (),
Kind::WalletConnectRequest => (),
_ => return Ok(None), // skip other event types
};
// Create the main event insertion query. // Create the main event insertion query.
let event_insert_query = worker::query!( let event_insert_query = worker::query!(
db, db,