From 750c066cb1f5c81226ef2933813b6aec085603eb Mon Sep 17 00:00:00 2001 From: Kyle Espinola Date: Fri, 8 Sep 2023 12:03:32 +0200 Subject: [PATCH] fix: add collection id to drop create --- api/proto.lock | 4 ++-- api/proto.toml | 2 +- api/src/events.rs | 4 +++- api/src/mutations/drop.rs | 1 + 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/api/proto.lock b/api/proto.lock index dcd0349..ecab697 100644 --- a/api/proto.lock +++ b/api/proto.lock @@ -5,8 +5,8 @@ sha512 = "d75800df0d4744c6b0f4d9a9952d3bfd0bb6b24a8babd19104cc11b54a525f85551b3c [[schemas]] subject = "nfts" -version = 27 -sha512 = "ec52dffa482eb3beb72b1ae1745f3b8cb1b6d321d20fdc30078f4362c924b0f75ebe3dc53c54e5de92ea55163b64f09fe4e2b749c1bc5bc64d92f8356835eb90" +version = 28 +sha512 = "25960e99e2eb1edeb70b7619918926d877b834640cf44fcc8104da5be6e213c05be18f8f49dba35e649d751bc62e16d9ca428cbafdb432b7c0b7f40a6cef7483" [[schemas]] subject = "organization" diff --git a/api/proto.toml b/api/proto.toml index a75af55..3d92c89 100644 --- a/api/proto.toml +++ b/api/proto.toml @@ -3,7 +3,7 @@ endpoint = "https://schemas.holaplex.tools" [schemas] organization = 5 -nfts = 27 +nfts = 28 customer = 2 treasury = 22 solana_nfts = 10 diff --git a/api/src/events.rs b/api/src/events.rs index 7085a2d..8a2dd9a 100644 --- a/api/src/events.rs +++ b/api/src/events.rs @@ -580,7 +580,7 @@ impl Processor { let drop_model = drop.ok_or(ProcessorErrorKind::DbMissingDrop)?; let mut drops_active_model: drops::ActiveModel = drop_model.clone().into(); - let mut collection_active_model: collections::ActiveModel = collection_model.into(); + let mut collection_active_model: collections::ActiveModel = collection_model.clone().into(); let mut creation_status = NftCreationStatus::Completed; if let MintResult::Success(MintTransaction { signature, address }) = payload { @@ -606,6 +606,7 @@ impl Processor { Some(&NftEvents { event: Some(NftEvent::DropCreated(DropCreation { status: creation_status as i32, + collection_id: collection_model.id.to_string(), })), }), Some(&NftEventKey { @@ -655,6 +656,7 @@ impl Processor { Some(&NftEvents { event: Some(NftEvent::DropCreated(DropCreation { status: creation_status as i32, + collection_id: collection_model.id.to_string(), })), }), Some(&NftEventKey { diff --git a/api/src/mutations/drop.rs b/api/src/mutations/drop.rs index 67fe6f3..71e0a64 100644 --- a/api/src/mutations/drop.rs +++ b/api/src/mutations/drop.rs @@ -177,6 +177,7 @@ impl Mutation { Some(&NftEvents { event: Some(NftEvent::DropCreated(proto::DropCreation { status: NftCreationStatus::InProgress as i32, + collection_id: collection.id.to_string(), })), }), Some(&NftEventKey {