diff --git a/container/src/hledger-flow/accounts/electrum/electrum-shared.bash b/container/src/hledger-flow/accounts/electrum/electrum-shared.bash index 4775818..584506f 100755 --- a/container/src/hledger-flow/accounts/electrum/electrum-shared.bash +++ b/container/src/hledger-flow/accounts/electrum/electrum-shared.bash @@ -52,11 +52,24 @@ function parse() value=$4-$6 # Remove fee printf("%.8f", value); printf OFS - sub(/^-/, "", $5) - printf("%.8f", $5); printf OFS # fiat_value + # fiat_value + if ($5 !~ /^No Data$/) + { + sub(/^-/, "", $5) + printf("%.8f", $5) + } + printf OFS - printf("%.8f", $6); printf OFS # fee - printf("%.8f", $7); printf OFS # fiat_fee + # fee + printf("%.8f", $6) + printf OFS + + # fiat_fee + if ($7 !~ /^No Data$/) + { + printf("%.8f", $7) + } + printf OFS # timestamp sub(/ /, "T", $8) # HACK: makes arg-friendly by removing space