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

Feature/subtivity #52

Merged
merged 20 commits into from
Nov 22, 2023
Merged

Feature/subtivity #52

merged 20 commits into from
Nov 22, 2023

Conversation

DenisCarriere
Copy link
Contributor

No description provided.


private fetchData() {
this.ChainsPromise = client
.query({ query: "SELECT DISTINCT chain FROM blocks", format: "JSONEachRow" })
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we could replace blocks => module_hashes and it will be much faster since there's only a few rows

src/config.ts Outdated
@@ -15,6 +15,7 @@ export const DEFAULT_MAX_LIMIT = 500;
export const DEFAULT_VERBOSE = false;
export const APP_NAME = pkg.name;
export const DEFAULT_SORT_BY = "DESC";
export const DEFAULT_AGGREGATE_FUNCTION = "count";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

src/utils.ts Outdated
@@ -68,3 +78,70 @@ export function parseTimestamp(timestamp?: string|null|number) {
}
return undefined;
}

export function parseAggregateFunction(aggregate_function?: string|null) {
if (aggregate_function == undefined || aggregate_function == null || aggregate_function == '') return "sum";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This can be simplified to:

if (!aggregate_function) return "sum";

src/utils.ts Outdated
}

export function parseHistoryRange(range?: string|null) {
if (range == undefined || range == '') return "24h";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

same simplified:

if (!range) return "24h";

@github-actions github-actions bot added documentation Improvements or additions to documentation feature New feature or request labels Nov 22, 2023
This reverts commit e18d74e, reversing
changes made to 5eab96a.
@DenisCarriere DenisCarriere merged commit ff26fe1 into main Nov 22, 2023
2 checks passed
@DenisCarriere DenisCarriere deleted the feature/subtivity branch November 22, 2023 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants