fix(ledger): keep legacy amount wire type and preserve dividend tax decimals

Co-authored-by: genichin <4282227+genichin@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-09-09 13:00:23 +00:00
committed by GitHub
co-authored by genichin
parent fde5b33f05
commit d3601d32dc
8 changed files with 131 additions and 19 deletions
+4 -4
View File
@@ -220,11 +220,11 @@ class ManualLedgerResponse(BaseModel):
ledger_entry_id: int
portfolio_id: str
action: str
amount: Decimal | None = None
amount: float | Decimal | None = None
quantity: float = 0.0
price: float = 0.0
fee: float = 0.0
tax: float = 0.0
tax: float | Decimal = 0.0
executed_at: datetime | None = None
note: str = ""
recorded_at: datetime | None = None
@@ -254,10 +254,10 @@ class LedgerHistoryItem(BaseModel):
order_id: str | None = None
execution_id: str | None = None
quantity: float | None = None
amount: Decimal | None = None
amount: float | Decimal | None = None
price: float | None = None
fee_amount: float | None = None
tax_amount: float | None = None
tax_amount: float | Decimal | None = None
note: str | None = None
cash_balance_after: float | None = None
asset_quantity_after: float | None = None