From fc53b1310f78d493411eb3b9f90f2bbc5d82eee4 Mon Sep 17 00:00:00 2001 From: Aaron Fiore Date: Mon, 6 Apr 2026 14:41:45 -0700 Subject: [PATCH] container: lib_taxes: don't write empty OBFS keymap rows - Removes empty row quotations after selecting column. - No longer writes row when `RawValue` is subsequently empty. - Variable name refactor (`RawValue` is not limited to accounts). NOTE: headers are still written, regardless of any keymap data. --- container/src/finance/lib/internal/lib_taxes.bash | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/container/src/finance/lib/internal/lib_taxes.bash b/container/src/finance/lib/internal/lib_taxes.bash index 3b52bbb..378dea1 100644 --- a/container/src/finance/lib/internal/lib_taxes.bash +++ b/container/src/finance/lib/internal/lib_taxes.bash @@ -1348,7 +1348,7 @@ function lib_taxes::__reports_obfs_gen() # Generate obfs/raw keymap local _raw_column - _raw_column="$(xan select $_column $_in_file | tail -n +2 | sort -u)" + _raw_column="$(xan select $_column $_in_file | tail -n +2 | sort -u | grep -v \"\")" local _count _count=$(echo "$_raw_column" | wc -l) @@ -1358,7 +1358,7 @@ function lib_taxes::__reports_obfs_gen() local _obfs_column _obfs_column="$(echo "$_raw_column" \ - | while read _account; do + | while read _entry; do # # OBFS column key is a truncated SHA digest of complete profile along with complete account. # @@ -1370,7 +1370,7 @@ function lib_taxes::__reports_obfs_gen() # - complete profile is included as a means to provide a 'reasonable' salt # (since default account names and memos can be used across profiles or subprofiles) # - echo -n "${global_parent_profile}/${global_child_profile}/${_account}" | "$_sha" | head -c${2:-10} + echo -n "${global_parent_profile}/${global_child_profile}/${_entry}" | "$_sha" | head -c${2:-10} echo done)" @@ -1394,7 +1394,7 @@ function lib_taxes::__reports_obfs_gen() for(i = 1; i <= count; i++) { - print r[i] OFS o[i] + if (r[i]) {print r[i] OFS o[i]} } }' FS=, OFS=, \ | (