Skip to content

Commit

Permalink
Merge pull request #219 from holaplex/espi/patch-drop-created-collect…
Browse files Browse the repository at this point in the history
…ion-id

Add collection id to drop create event
  • Loading branch information
kespinola authored Sep 8, 2023
2 parents 1e61150 + 750c066 commit 0106920
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions api/proto.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ sha512 = "d75800df0d4744c6b0f4d9a9952d3bfd0bb6b24a8babd19104cc11b54a525f85551b3c

[[schemas]]
subject = "nfts"
version = 27
sha512 = "ec52dffa482eb3beb72b1ae1745f3b8cb1b6d321d20fdc30078f4362c924b0f75ebe3dc53c54e5de92ea55163b64f09fe4e2b749c1bc5bc64d92f8356835eb90"
version = 28
sha512 = "25960e99e2eb1edeb70b7619918926d877b834640cf44fcc8104da5be6e213c05be18f8f49dba35e649d751bc62e16d9ca428cbafdb432b7c0b7f40a6cef7483"

[[schemas]]
subject = "organization"
Expand Down
2 changes: 1 addition & 1 deletion api/proto.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ endpoint = "https://schemas.holaplex.tools"

[schemas]
organization = 5
nfts = 27
nfts = 28
customer = 2
treasury = 22
solana_nfts = 10
Expand Down
4 changes: 3 additions & 1 deletion api/src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions api/src/mutations/drop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 0106920

Please sign in to comment.