#2998 check values before use

This commit is contained in:
rootzoll
2022-05-17 19:02:24 +02:00
parent cd969ada4a
commit 627506276f

View File

@@ -97,8 +97,16 @@ do
do
channelInPubKey=${channelIdPubKeyLookup[$channelIdIn]}
channelOutPubKey=${channelIdPubKeyLookup[$channelIdOut]}
channelInPubKeyLookup=""
if [ "${channelInPubKey}" != "" ]; then
channelInPubKeyLookup=pubKeyAliasLookup[$channelInPubKey]
fi
channelOutPubKeyLookup=""
if [ "${channelInPubKey}" != "" ]; then
channelOutPubKeyLookup=pubKeyAliasLookup[$channelOutPubKey]
fi
OUTPUT="${OUTPUT}
${eventDate},${pubKeyAliasLookup[$channelInPubKey]},${pubKeyAliasLookup[$channelOutPubKey]},$amountIn,$fee"
${eventDate},${channelInPubKeyLookup},${channelOutPubKeyLookup},$amountIn,$fee"
done < <(tail -n +2 <<< $events)