-
Notifications
You must be signed in to change notification settings - Fork 4
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
fix: check time window for first batch fetched #270
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -57,6 +57,21 @@ export class TokenDispenserEventSubscriber { | |||
this.connection.commitment as anchor.web3.Finality | |||
) | |||
let batchWithinWindow = true | |||
if (currentBatch.length === 0) { |
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.
Does this code work? currentBatch.length is always > 0 as long as there have been transactions, currentBatch.length === 0
only happens before there have been any transactions
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.
Youre right this length check is unnecessary assuming the program has been deployed and initialized but the rest of the logic should work. thanks for catching this.
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.
Wait isn't the else
part the same thing as below ?
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.
Yes but i need to do it once before the while loop since the while loop does the concat for the signatures I'm actually going to parse. Sorry let me rewrite this to be cleaner
No description provided.