-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support batch mint of random queued nfts #88
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some cases of the unwrap and unwrap_or around.
consumer/src/events.rs
Outdated
.ok_or(ProcessorErrorKind::RecordNotFound) | ||
.unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.ok_or(ProcessorErrorKind::RecordNotFound) | |
.unwrap(); | |
.ok_or(ProcessorErrorKind::RecordNotFound)?; |
let blockhash = if let Some(blockhash) = blockhash { | ||
blockhash | ||
} else { | ||
with_retry!(rpc.get_latest_blockhash()).await? | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking unwrap_or_else
https://stackoverflow.com/questions/56726571/why-choosing-unwrap-or-else-over-unwrap-or
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the function is async
@@ -390,6 +398,7 @@ impl EventKind { | |||
address: collection_mint.mint, | |||
}) | |||
}, | |||
Self::MintOpenDropBatched => unreachable!(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not instead of writing a different batch method you incorporate the logic here? Can have helper function for consolidating the logic.
todo: update schemas