diff --git a/personal_data/fetchers/partisia_blockchain.py b/personal_data/fetchers/partisia_blockchain.py index a165cf3..10527d5 100644 --- a/personal_data/fetchers/partisia_blockchain.py +++ b/personal_data/fetchers/partisia_blockchain.py @@ -25,6 +25,9 @@ HOSTNAME = 'reader.partisiablockchain.com' URL_ACCOUNT_PLUGIN = 'https://{hostname}/{shard}blockchain/accountPlugin/local' URL_ACCOUNT_PLUGIN_GLOBAL = 'https://{hostname}/{shard}blockchain/accountPlugin/global' +def shard_id_for_address(address: str) -> str: + return 'shards/Shard2/' # TODO + @dataclasses.dataclass(frozen=True) class MpcBalance(Scraper): dataset_name = 'defi_mpc_balance' @@ -52,7 +55,6 @@ class MpcBalance(Scraper): url = URL_ACCOUNT_PLUGIN_GLOBAL.format( hostname = HOSTNAME, shard = '', - #shard = 'shards/Shard0/', ) json_data, date = self.get_json(url, data=data) @@ -69,7 +71,7 @@ class MpcBalance(Scraper): url = URL_ACCOUNT_PLUGIN.format( hostname = HOSTNAME, - shard = 'shards/Shard0/', + shard = shard_id_for_address(address), ) data: dict = {'path':[{'type':'field','name':'accounts'},{'type':'avl','keyType':'BLOCKCHAIN_ADDRESS','key':address}]}