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

Indexer-common: Fix automatic rule creation upon confirmed action execution #470

Merged
merged 2 commits into from Aug 29, 2022

Conversation

fordN
Copy link
Contributor

@fordN fordN commented Aug 29, 2022

This PR primarily contains a few important fixes to the auto rule creation that is done after a manual action is executed.

Fixes included:

  • Use correct number formatting when auto creating rules upon confirmation of action execution (test case added for this).
  • Always upsert an offchain rule after an unallocate action to ensure the agent doesn't recreate the allocation.

Small improvements made while updating:

  • Improved detail of error messages when batch execution fails confirmTransactions().
  • Add a test for inserting and fetching rules using helper functions in indexer-common (testing the first fix listed above).

@fordN fordN self-assigned this Aug 29, 2022
@fordN fordN added indexer-common bug Something isn't working labels Aug 29, 2022
@fordN fordN requested a review from hopeyen August 29, 2022 17:24
- Use correct allocationAmount Bignumber formatting when auto creating
rules
- Always upsert an offchain rule when confirming unallocate actions
- Move some indexing-rule utils to indexer-common
- Add test for inserting and fetching rule helper functions
- Improve failed confirmTransactions error message
@fordN fordN force-pushed the ford/fix-auto-rule-creation-allocation-amount branch from 8811b98 to 587bb64 Compare August 29, 2022 22:58
@fordN fordN merged commit 4204e50 into main Aug 29, 2022
@fordN fordN deleted the ford/fix-auto-rule-creation-allocation-amount branch August 29, 2022 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working indexer-common
Projects
Status: 🚗 Merged
Development

Successfully merging this pull request may close these issues.

None yet

2 participants