Skip to content

Commit

Permalink
Update views.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptobench committed Jan 15, 2024
1 parent 8e8b76b commit 38f88c3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions stats-backend/api2/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ def verify_provider_is_working(request):
{"error": "node_id is required"}, status=status.HTTP_400_BAD_REQUEST
)

checksum_address_user = Web3.to_checksum_address(request.user.userprofile.wallet_address)
checksum_address_user = Web3.to_checksum_address(
request.user.userprofile.wallet_address
)
checksum_address_provider = Web3.to_checksum_address(provider.wallet)
if checksum_address_user != checksum_address_provider:
return Response(
Expand All @@ -210,7 +212,9 @@ def verify_provider_is_working(request):
else:
network = "goerli"
obj = HealtcheckTask.objects.create(
provider=provider, user=request.user, status="The Healthcheck has been scheduled to queue. We will start in a moment."
provider=provider,
user=request.user.userprofile,
status="The Healthcheck has been scheduled to queue. We will start in a moment.",
)

healthcheck_provider.delay(node_id, network, obj.id)
Expand Down

0 comments on commit 38f88c3

Please sign in to comment.