From 471a7ebcb3d643b0ee812a0f6a4efce83578511c Mon Sep 17 00:00:00 2001 From: imabdulbasit Date: Tue, 12 Sep 2023 18:19:02 +0500 Subject: [PATCH] update proto schemas version --- consumer/src/events.rs | 25 +++++++++---------------- core/proto.lock | 8 ++++---- core/proto.toml | 8 ++++---- 3 files changed, 17 insertions(+), 24 deletions(-) diff --git a/consumer/src/events.rs b/consumer/src/events.rs index da646e1..823065b 100644 --- a/consumer/src/events.rs +++ b/consumer/src/events.rs @@ -240,7 +240,7 @@ impl EventKind { signature, }) }, - Self::MintToCollection => { + Self::MintToCollection | Self::MintOpenDrop => { let id = id()?; let collection_mint = CollectionMint::find_by_id(conn, id).await?; @@ -270,11 +270,15 @@ impl EventKind { .ok_or(ProcessorErrorKind::RecordNotFound)? .mint }; + let transaction = SolanaCompletedMintTransaction { signature, address }; - SolanaNftEvent::MintToCollectionSubmitted(SolanaCompletedMintTransaction { - signature, - address, - }) + match self { + Self::MintToCollection => { + SolanaNftEvent::MintToCollectionSubmitted(transaction) + }, + Self::MintOpenDrop => SolanaNftEvent::MintOpenDropSubmitted(transaction), + _ => unreachable!(), + } }, Self::MintEditionDrop => { let id = id()?; @@ -356,17 +360,6 @@ impl EventKind { address: collection.mint, }) }, - Self::MintOpenDrop => { - let id = id()?; - let collection_mint = CollectionMint::find_by_id(conn, id) - .await? - .ok_or(ProcessorErrorKind::RecordNotFound)?; - - SolanaNftEvent::MintOpenDropSubmitted(SolanaCompletedMintTransaction { - signature, - address: collection_mint.mint, - }) - }, Self::UpdateOpenDrop => { SolanaNftEvent::UpdateOpenDropSubmitted(SolanaCompletedUpdateTransaction { signature, diff --git a/core/proto.lock b/core/proto.lock index ed7b295..1c4fe4d 100644 --- a/core/proto.lock +++ b/core/proto.lock @@ -1,14 +1,14 @@ [[schemas]] subject = "nfts" -version = 2 -sha512 = "db8fa9f4b2874ab79305997c3b255a9b9c1b04d291c66f1cb97f332b32758055c01e6ba0e7a4089255c664324c51fc4fe25a9d138698b7a999b1f4d2b5503a48" +version = 29 +sha512 = "b3b2136bd6c7a136d317da84395661de5fc056e8270510575a3281d78884d99a0d89f444754ed02cb18ad26dcc7cd65300c1df73b9d74d2edc6bcc8d552465d0" [[schemas]] subject = "solana_nfts" -version = 4 +version = 11 sha512 = "967fefde938a0f6ce05194e4fca15673e681caac54d8aeec114c5d38418632b9696dbaf5362345a15114e5abb49de55d0af8b9edcc0f2c91f9ef1ccc4ff55d68" [[schemas]] subject = "treasury" -version = 3 +version = 23 sha512 = "0e4d77999767d5971122e720c1cee7a57c3e47ce69f58a582f1762d8e65e031ea3bd9024cfc21bd7da5db6e38a71657151c58cdfa21d9ff643fb2fc657105cf5" diff --git a/core/proto.toml b/core/proto.toml index 305d46f..62864f2 100644 --- a/core/proto.toml +++ b/core/proto.toml @@ -1,7 +1,7 @@ [registry] -endpoint = "http://localhost:8081" +endpoint = "https://schemas.holaplex.tools" [schemas] -nfts = 2 -treasury = 3 -solana_nfts = 4 \ No newline at end of file +nfts = 29 +treasury = 23 +solana_nfts = 11 \ No newline at end of file