1
0

Fixed decimals
All checks were successful
Build container / Package-Python (push) Successful in 26s
Build container / Package-Container (push) Successful in 1m21s

This commit is contained in:
Jon Michael Aanes 2024-05-16 00:52:13 +02:00
parent 42574f98a4
commit ad6b6fef08
Signed by: Jmaa
SSH Key Fingerprint: SHA256:Ab0GfHGCblESJx7JRE4fj4bFy/KRpeLhi41y4pF3sNA

View File

@ -24,6 +24,7 @@ HOSTNAME = 'reader.partisiablockchain.com'
URL_ACCOUNT_PLUGIN = 'https://{hostname}/{shard}blockchain/accountPlugin/local'
URL_ACCOUNT_PLUGIN_GLOBAL = 'https://{hostname}/{shard}blockchain/accountPlugin/global'
MPC_DECIMALS = 10000
def shard_id_for_address(address: str) -> str:
return 'shards/Shard2/' # TODO
@ -85,7 +86,7 @@ class MpcBalance(Scraper):
'account.update_time': date,
}
data_point['balance.MPC'] = Decimal(account_data['mpcTokens']) / 1000
data_point['balance.MPC'] = Decimal(account_data['mpcTokens']) / MPC_DECIMALS
for coin_idx, amount_data in enumerate(account_data['accountCoins']):
coin_data = coins[coin_idx]