From ac140eab3ea434e9461870c0defc709101af3727 Mon Sep 17 00:00:00 2001 From: Boluwatife Popoola Date: Mon, 20 Jan 2025 17:03:53 +0100 Subject: [PATCH] change block height --- pots/api.py | 3 +-- pots/serializers.py | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pots/api.py b/pots/api.py index b0325c5..093ea4e 100644 --- a/pots/api.py +++ b/pots/api.py @@ -520,8 +520,7 @@ def get(self, request: Request, voter_id: str, *args, **kwargs): try: voter_data = self.get_voter_data(voter_id) - # accounts = self.get_bulk_account_data([voter_id]) - account_data = accounts = AccountSerializer(voter_id).data + account_data = self.get_bulk_account_data([voter_id]) response_data = { "voter_id": voter_id, diff --git a/pots/serializers.py b/pots/serializers.py index 78ef61b..9a46c4c 100644 --- a/pots/serializers.py +++ b/pots/serializers.py @@ -361,7 +361,7 @@ def get_is_human(self, obj) -> bool: if cached_res is not None: return cached_res - url = f"https://rpc.web4.near.page/account/v1.nadabot.near/view/is_human?account_id={voter_id}&near_block_height=137346724" + url = f"https://rpc.web4.near.page/account/v1.nadabot.near/view/is_human?account_id={voter_id}&near_block_height=137273829" response = requests.get(url) if response.status_code == 200: is_human = response.json() @@ -376,7 +376,7 @@ def get_staking_token_balance(self, obj): if cached_res is not None: return cached_res - url = f"https://rpc.web4.near.page/account/meta-pool.near/view/ft_balance_of?account_id={voter_id}&near_block_height=137346724" + url = f"https://rpc.web4.near.page/account/meta-pool.near/view/ft_balance_of?account_id={voter_id}&near_block_height=137273829" response = requests.get(url) if response.status_code == 200: balance = response.json()