Skip to content
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

feat: Update frontend to handle new registry types #566

Merged
merged 11 commits into from
Feb 21, 2024

Conversation

morgsmccauley
Copy link
Collaborator

@morgsmccauley morgsmccauley commented Feb 16, 2024

This PR updates the frontend to work with the updated registry contract types/methods. There are two parts to this change:

  • Consuming the new types, mainly rule and startBlock, and writing these types back during registration
  • Adding the new StartBlock::Continue option, which allows developers to resume the existing block stream.

I've attached images of the updated UI for reference. Note that updating the contract filter is disabled with the new "Continue" option.

image
image

@morgsmccauley morgsmccauley linked an issue Feb 16, 2024 that may be closed by this pull request
@morgsmccauley morgsmccauley force-pushed the feat/start-block-continue-ui branch from 31d9a9b to 5d04394 Compare February 20, 2024 00:54
@morgsmccauley morgsmccauley force-pushed the feat/start-block-continue-ui branch from 5d04394 to 655e734 Compare February 20, 2024 01:01
@morgsmccauley morgsmccauley marked this pull request as ready for review February 20, 2024 01:08
@morgsmccauley morgsmccauley requested a review from a team as a code owner February 20, 2024 01:08
@morgsmccauley morgsmccauley changed the title feat/start block continue ui feat: Update frontend to handle new registry types Feb 20, 2024
Copy link
Collaborator

@darunrs darunrs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just two questions and a small comment.

HEIGHT: indexerConfig.height
};
} else if (indexerConfig.startBlock === "startBlockLatest") {
startBlock = "LATEST";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How come startBlockHeight sets startBlock to an object whereas latest and continue set it to a string? Is this a quirk of the way the new register function expects it?

<Form.Control
value={contractFilter}
onChange={handleSetContractFilter}
value={startBlock === START_BLOCK.CONTINUE ? indexerDetails.rule.affected_account_id : contractFilter}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to change the filter on LATEST, then check CONTINUE and it publishes new filter IDs anyway?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, when we change to CONTINUE, the filter gets reset back to the original state :)

@morgsmccauley morgsmccauley merged commit 345e15a into main Feb 21, 2024
@morgsmccauley morgsmccauley deleted the feat/start-block-continue-ui branch February 21, 2024 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow developers to configure StartBlock::Continue via UI
2 participants