Skip to content

Commit

Permalink
Merge pull request #163 from UnitapApp/feature/gastap_dynamic_round_d…
Browse files Browse the repository at this point in the history
…uration

fix remaining claims error
  • Loading branch information
Mohamad Bastin authored Oct 27, 2023
2 parents 605cfed + 8654374 commit 190b2f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions faucet/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
ClaimCountView,
ClaimMaxView,
DonationReceiptView,
GetTotalWeeklyClaimsRemainingView,
GetTotalRoundClaimsRemainingView,
GlobalSettingsView,
LastClaimView,
LeaderboardView,
Expand All @@ -35,7 +35,7 @@
urlpatterns = [
path(
"user/remainig-claims/",
GetTotalWeeklyClaimsRemainingView.as_view(),
GetTotalRoundClaimsRemainingView.as_view(),
name="remaining-claims",
),
path("user/last-claim/", LastClaimView.as_view(), name="last-claim"),
Expand Down
6 changes: 3 additions & 3 deletions faucet/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def get_queryset(self):
).order_by("-pk")


class GetTotalWeeklyClaimsRemainingView(RetrieveAPIView):
class GetTotalRoundClaimsRemainingView(RetrieveAPIView):
"""
Return the total weekly claims remaining for the given user
"""
Expand All @@ -95,8 +95,8 @@ def get(self, request, *args, **kwargs):
user_profile = request.user.profile
gs = GlobalSettings.objects.first()
if gs is not None:
result = gs.weekly_chain_claim_limit - LimitedChainClaimManager.get_total_weekly_claims(user_profile)
return Response({"total_weekly_claims_remaining": result}, status=200)
result = gs.gastap_round_claim_limit - LimitedChainClaimManager.get_total_round_claims(user_profile)
return Response({"total_round_claims_remaining": result}, status=200)
else:
raise Http404("Global Settings Not Found")

Expand Down

0 comments on commit 190b2f7

Please sign in to comment.