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

Fix: billing rate on first billing cycle #3490

Merged
merged 2 commits into from
Oct 8, 2024

Conversation

0oM4R
Copy link
Contributor

@0oM4R 0oM4R commented Oct 1, 2024

-update GqlConsumption interface
-initialize duration with 1 to avoid accessed before initialization error -avoid divide by zero by using the || operator

Description

the query response have each contract type separated while we are trying to access them indie contracts property
the solution is to access the contracts types directly

Changes

-update GqlConsumption interface
-initialize duration with 1 to avoid accessed before initialization error -avoid divide by zero by using the || operator

Related Issues

Tested Scenarios

get contract on its first billing cycle, and other with more than one billing report

Screenshot from 2024-10-01 15-23-43
Screenshot from 2024-10-01 15-24-30

Screenshot from 2024-10-01 16-15-26
Screenshot from 2024-10-01 16-15-32

-update GqlConsumption interface
-initialize duration with 1 to avoid accessed before initialization error
-avoid divide by zero by using the || operator
Comment on lines 70 to 72
nameContracts: GqlNameContract[];
nodeContracts: GqlNodeContract[];
rentContracts: GqlRentContract[];
Copy link
Contributor

Choose a reason for hiding this comment

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

you can extend this interface instead GqlContracts

@AhmedHanafy725 AhmedHanafy725 merged commit cf78b1b into development Oct 8, 2024
6 checks passed
@AhmedHanafy725 AhmedHanafy725 deleted the development_billingRate branch October 8, 2024 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants