refactor(v2): rename net_sats → principal_sats for semantic clarity
`net` is financial-accounting ambiguous (net of what?). In the
bitSpire/DCA context this column is specifically the principal the
operator distributes to LPs (gross − commission), not a generic net
amount. Renaming locally before any bitSpire firmware locks the
wire-level name; lamassu-next#44 should adopt the same name.
Scope:
- migrations.py: m003 ALTER TABLE … RENAME COLUMN, idempotent probe
pattern matching m002. Also updates the m001 canonical schema so
fresh installs land on the new column directly.
- models.py: `CreateDcaSettlementData.principal_sats` /
`DcaSettlement.principal_sats`. Field-doc comment updated.
- bitspire.py: both happy path and fallback path return
`principal_sats=…`. Reads `extra.get("principal_sats")` from the
bitSpire payload (lamassu-next#44 should follow this rename).
- crud.py: INSERT column list + `apply_partial_dispense(
new_principal_sats=…)` keyword.
- distribution.py: every `settlement.net_sats` → `settlement.
principal_sats`; partial-dispense memo + helper signatures updated;
the leg-order docblock at the top reads "principal_sats".
- tasks.py: landed-settlement log line.
- static/js/index.js: settlements-table column `principal_sats` with
label "Principal (→ LPs)".
- templates/satmachineadmin/index.html: q-td key + binding.
All 86 unit tests still pass. No backwards-compat shim — v2-bitspire
isn't released; the rename is a clean break.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
9414a18f82
commit
1feaba80ed
8 changed files with 97 additions and 106 deletions
|
|
@ -164,7 +164,7 @@ window.app = Vue.createApp({
|
|||
{name: 'status', label: 'Status', field: 'status', align: 'left'},
|
||||
{name: 'created_at', label: 'Time', field: 'created_at', align: 'left'},
|
||||
{name: 'gross_sats', label: 'Gross', field: 'gross_sats', align: 'right'},
|
||||
{name: 'net_sats', label: 'Net (→ LPs)', field: 'net_sats', align: 'right'},
|
||||
{name: 'principal_sats', label: 'Principal (→ LPs)', field: 'principal_sats', align: 'right'},
|
||||
{
|
||||
name: 'commission_sats',
|
||||
label: 'Commission',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue