diff --git a/static/js/index.js b/static/js/index.js
index 0d70405..cdb493f 100644
--- a/static/js/index.js
+++ b/static/js/index.js
@@ -159,6 +159,7 @@ window.app = Vue.createApp({
settlementsTable: {
columns: [
{name: 'status', label: 'Status', field: 'status', align: 'left'},
+ {name: 'tx_type', label: 'Direction', field: 'tx_type', align: 'left'},
{name: 'created_at', label: 'Time', field: 'created_at', align: 'left'},
{name: 'wire_sats', label: 'Wire', field: 'wire_sats', align: 'right'},
{name: 'principal_sats', label: 'Principal (→ LPs)', field: 'principal_sats', align: 'right'},
@@ -764,6 +765,34 @@ window.app = Vue.createApp({
return SETTLEMENT_STATUS_COLOR[status] || 'grey'
},
+ txTypeChip(txType) {
+ // Direction at the ATM (business semantics), not at the operator's
+ // wallet (Lightning protocol semantics). See the canonical mapping
+ // in tasks.py:_handle_payment — cash_out ↔ inbound Lightning,
+ // cash_in ↔ outbound Lightning.
+ if (txType === 'cash_in') {
+ return {
+ color: 'orange-8',
+ icon: 'north_east',
+ label: 'cash-in',
+ tooltip:
+ 'Cash-in: customer deposited fiat at the ATM, operator wallet ' +
+ 'sent sats (LNURL-withdraw). No DCA distribution; liquidity ' +
+ 'stays in the operator wallet.'
+ }
+ }
+ // Default to cash_out — both the only direction shipped pre-S8 and
+ // the safer "unknown means cash_out" fallback for legacy rows.
+ return {
+ color: 'green-8',
+ icon: 'south_west',
+ label: 'cash-out',
+ tooltip:
+ 'Cash-out: customer paid the ATM\'s invoice in BTC, operator ' +
+ 'wallet received sats. Principal is distributed to LPs.'
+ }
+ },
+
// -----------------------------------------------------------------
// Settlement actions: retry, partial-dispense, force-reset, note
// -----------------------------------------------------------------
diff --git a/templates/satmachineadmin/index.html b/templates/satmachineadmin/index.html
index 4cf80c6..6278ef9 100644
--- a/templates/satmachineadmin/index.html
+++ b/templates/satmachineadmin/index.html
@@ -874,6 +874,17 @@
+
+
+
+
+
+
+
+