Rename fee_percent to fee_rate for clarity #40

Open
opened 2026-06-13 22:02:57 +00:00 by padreug · 0 comments
Owner

Migrated from aiolabs/lamassu-next#40 — opened by @padreug on 2026-04-03.\n\nThe fee_percent name is used throughout the codebase but stores a decimal ratio (e.g., 0.0777 for 7.77%), not a percentage. This is misleading.

Affected locations

  • DB column: transactions.fee_percent → fee_rate
  • State machine context: feePercent, cashInFeePercent, cashOutFeePercent → feeRate, cashInFeeRate, cashOutFeeRate
  • Env vars: VITE_CASH_IN_FEE_PERCENT, VITE_CASH_OUT_FEE_PERCENT → VITE_CASH_IN_FEE_RATE, VITE_CASH_OUT_FEE_RATE
  • atm-tui: display formatting references

Requires

  • DB migration to rename the column
  • Update all references in state-machine, stores, views, and atm-tui
  • Keep display formatting as * 100 + % suffix

Low priority — purely cosmetic, no functional change.

> _Migrated from [aiolabs/lamassu-next#40](https://git.atitlan.io/aiolabs/lamassu-next/issues/40) — opened by @padreug on 2026-04-03._\n\nThe `fee_percent` name is used throughout the codebase but stores a decimal ratio (e.g., `0.0777` for 7.77%), not a percentage. This is misleading. ## Affected locations - **DB column**: `transactions.fee_percent` → `fee_rate` - **State machine context**: `feePercent`, `cashInFeePercent`, `cashOutFeePercent` → `feeRate`, `cashInFeeRate`, `cashOutFeeRate` - **Env vars**: `VITE_CASH_IN_FEE_PERCENT`, `VITE_CASH_OUT_FEE_PERCENT` → `VITE_CASH_IN_FEE_RATE`, `VITE_CASH_OUT_FEE_RATE` - **atm-tui**: display formatting references ## Requires - DB migration to rename the column - Update all references in state-machine, stores, views, and atm-tui - Keep display formatting as `* 100` + `%` suffix Low priority — purely cosmetic, no functional change.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aiolabs/bitspire#40
No description provided.