1
0

partisia blockchain double registers wip
Some checks failed
Python Ruff Code Quality / ruff (push) Failing after 22s
Run Python tests (through Pytest) / Test (push) Successful in 30s
Verify Python project can be installed, loaded and have version checked / Test (push) Successful in 26s

This commit is contained in:
Jon Michael Aanes 2024-12-23 00:08:12 +01:00
parent 6e3c9a117b
commit ffc95d8f99
Signed by: Jmaa
SSH Key Fingerprint: SHA256:Ab0GfHGCblESJx7JRE4fj4bFy/KRpeLhi41y4pF3sNA

View File

@ -13,7 +13,14 @@ import fin_defs
import requests import requests
from frozendict import frozendict from frozendict import frozendict
from .data import DepoFetcher, DepoGroup, DepoSingle from .data import (
DepoFetcher,
DepoGroup,
DepoSingle,
DepositDetails,
DoubleRegister,
WithdrawalDetails,
)
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -179,3 +186,16 @@ class PartisiaBlockchainAccountDepoFetcher(DepoFetcher):
balances.update_time, balances.update_time,
[depo_mpc, depo_byoc], [depo_mpc, depo_byoc],
) )
def _get_withdrawals(self) -> list[WithdrawalDetails]:
raise UnsupportedOperationException("TODO")
def _get_deposits(self) -> list[DepositDetails]:
raise UnsupportedOperationException("TODO")
def _get_double_registers(self) -> list[DoubleRegister]:
double_registers: list[DoubleRegister] = []
double_registers += self._get_deposits()
double_registers += self._get_withdrawals()
double_registers.sort(key=lambda x: x.executed_time)
return double_registers