Skip to content

Commit

Permalink
Merge pull request #29 from MutinyWallet/fix-blastr-broadcasts-non-nwc
Browse files Browse the repository at this point in the history
Dont process non-nwc messages to db
  • Loading branch information
TonyGiorgio authored Aug 11, 2023
2 parents ef5c67f + a40fc83 commit 307c096
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>> {
// Determine the event kind
match event.kind {
Kind::WalletConnectResponse => (),
Kind::WalletConnectRequest => (),
_ => return Ok(None), // skip other event types
};

// Create the main event insertion query.
let event_insert_query = worker::query!(
db,
Expand Down

0 comments on commit 307c096

Please sign in to comment.