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: init arns discount elgibility and fee caclulation PE-7060 #164

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

fedellen
Copy link

@fedellen fedellen commented Nov 5, 2024

No description provided.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.90%. Comparing base (dbd4956) to head (96f1529).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #164      +/-   ##
===========================================
+ Coverage    90.84%   90.90%   +0.06%     
===========================================
  Files            9        9              
  Lines         1966     1991      +25     
===========================================
+ Hits          1786     1810      +24     
- Misses         180      181       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines +995 to +996
local tenureWeight = gateway.weights.tenureWeight
local gatewayPerformanceRatio = gateway.weights.gatewayRewardRatioWeight
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: this shouldn't happen, but lua throws up when comparing numbers to nil so I would add or 0 to both of these

Copy link
Collaborator

@dtfiedler dtfiedler left a comment

Choose a reason for hiding this comment

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

look good!

look into adding an integration test to gar.test.mjs - you can use @arielmelendez current branch for how to set up state with a gateway and then call handlers like buy-record and get-token-cost to validate the discount is applied for operators if they achieve the thresholds defined in the process. happy to pair on it speed up iterations.

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.

3 participants