Fixed decimals
This commit is contained in:
parent
42574f98a4
commit
ad6b6fef08
|
@ -24,6 +24,7 @@ HOSTNAME = 'reader.partisiablockchain.com'
|
||||||
URL_ACCOUNT_PLUGIN = 'https://{hostname}/{shard}blockchain/accountPlugin/local'
|
URL_ACCOUNT_PLUGIN = 'https://{hostname}/{shard}blockchain/accountPlugin/local'
|
||||||
URL_ACCOUNT_PLUGIN_GLOBAL = 'https://{hostname}/{shard}blockchain/accountPlugin/global'
|
URL_ACCOUNT_PLUGIN_GLOBAL = 'https://{hostname}/{shard}blockchain/accountPlugin/global'
|
||||||
|
|
||||||
|
MPC_DECIMALS = 10000
|
||||||
|
|
||||||
def shard_id_for_address(address: str) -> str:
|
def shard_id_for_address(address: str) -> str:
|
||||||
return 'shards/Shard2/' # TODO
|
return 'shards/Shard2/' # TODO
|
||||||
|
@ -85,7 +86,7 @@ class MpcBalance(Scraper):
|
||||||
'account.update_time': date,
|
'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']):
|
for coin_idx, amount_data in enumerate(account_data['accountCoins']):
|
||||||
coin_data = coins[coin_idx]
|
coin_data = coins[coin_idx]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user