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

Filter out duplicate estimates #56

Merged
merged 1 commit into from
Apr 23, 2024
Merged

Filter out duplicate estimates #56

merged 1 commit into from
Apr 23, 2024

Conversation

mrfelton
Copy link
Member

This addresses a bug in which duplicate entries were not always filtered out.

This pull request involves changes to the DataProviderManager class in src/lib/DataProviderManager.ts and the MockProvider3 class in test/DataProviderManager-merge.test.ts. The changes primarily aim to refine the logic for adding estimates and expand the test data for the MockProvider3 class.

Here are the key changes:

Changes to DataProviderManager class:

  • src/lib/DataProviderManager.ts: The logic for adding estimates has been simplified. The condition for adding an estimate now only checks if the current estimate is lower than the minimum of all existing estimates. The check for the absence of mergedEstimates[key] and the presence of estimates[key] has been removed. This change streamlines the logic and potentially improves the efficiency of the function.

Changes to MockProvider3 class:

  • test/DataProviderManager-merge.test.ts: Additional test data has been added to the MockProvider3 class. Specifically, data points with keys "6" and "7" have been added to the getAllData method. This expanded test data can provide a more comprehensive evaluation of the DataProviderManager's functionality. [1] [2]

@mrfelton mrfelton added the type:bug Indicates an unexpected problem or unintended behavior label Apr 23, 2024
@mrfelton mrfelton self-assigned this Apr 23, 2024
@mrfelton mrfelton merged commit 7ac2371 into master Apr 23, 2024
1 check passed
@mrfelton mrfelton deleted the fix/fee-min-filter branch April 23, 2024 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants