Commit 0d823e18 authored by 陈涛's avatar 陈涛

修改充值记录

parent 71ad4c98
...@@ -84,7 +84,21 @@ class BeaconChaService: ...@@ -84,7 +84,21 @@ class BeaconChaService:
"""获取质押信息""" """获取质押信息"""
url = f"{self.base_url}/api/v1/validator/{index_or_pubkey}/deposits" url = f"{self.base_url}/api/v1/validator/{index_or_pubkey}/deposits"
response = await self.service_request(url) response = await self.service_request(url)
return [ValidatorDeposit(**item) for item in response["data"]] return [ValidatorDeposit(
amount=item["amount"] / self.eth_decimal,
block_number=item["block_number"],
block_ts=item["block_ts"],
from_address=item["from_address"],
merkletree_index=item["merkletree_index"],
publickey=item["publickey"],
removed=item["removed"],
signature=item["signature"],
tx_hash=item["tx_hash"],
tx_index=item["tx_index"],
tx_input=item["tx_input"],
valid_signature=item["valid_signature"],
withdrawal_credentials=item["withdrawal_credentials"]
) for item in response["data"]]
async def get_validator_income(self, index_or_pubkey: Union[int, str]) -> List[ValidatorIncome]: async def get_validator_income(self, index_or_pubkey: Union[int, str]) -> List[ValidatorIncome]:
"""获取质押收益""" """获取质押收益"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment