Skip to content

Commit

Permalink
Merge pull request #398 from cardano-community/itnrewards-fix
Browse files Browse the repository at this point in the history
logic inverted and remove wallet folder on cancellation
  • Loading branch information
Scitz0 committed Aug 3, 2020
2 parents c6e219f + 195e507 commit 650324d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/cnode-helper-scripts/itnRewards.sh
Expand Up @@ -36,14 +36,14 @@ if [[ ! -d "${WALLET_FOLDER}/${wallet_name}" ]]; then
fi

if [[ $(cat "${itn_signing_key_file}") == ed25519e_* ]]; then
if ${CCLI} shelley key 2>&1 | grep -q "convert-itn-extended-key"; then
if ! ${CCLI} shelley key 2>&1 | grep -q "convert-itn-extended-key"; then
echo -e "\n${ORANGE}WARNING${NC}: cardano-cli lacks support for extended ITN key conversion: ${CCLI}\n"
echo -e "If a special version of cardano-cli is built with this support, please specify path below, else follow instructions available at:"
echo -e " https://cardano-community.github.io/guild-operators/#/Scripts/itnrewards\n"
while true; do
read -r -p "Enter path to cardano-cli with support for extended key conversion or press enter to quit: " CCLI
[[ -z "${CCLI}" ]] && exit 1
if ${CCLI} shelley key 2>&1 | grep -q "convert-itn-extended-key"; then
[[ -z "${CCLI}" ]] && rm -rf "${WALLET_FOLDER:?}/${wallet_name}" && exit 1
if ! ${CCLI} shelley key 2>&1 | grep -q "convert-itn-extended-key"; then
echo -e "\n${ORANGE}ERROR${NC}: specified file lacks support for extended ITN key conversion, please try again\n"
continue
fi
Expand Down

0 comments on commit 650324d

Please sign in to comment.