Skip to content

Commit

Permalink
Merge pull request #322 from cardano-community/sendADA-fix
Browse files Browse the repository at this point in the history
sendADA.sh fix after CNTools 2.0.0 release
  • Loading branch information
cardano-community committed Jul 12, 2020
2 parents d1d53f3 + 46121d1 commit 0d25405
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions scripts/cnode-helper-scripts/cntools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2042,7 +2042,7 @@ case $OPERATION in
elif [[ ${expiration_time_sec_diff} -lt ${KES_WARNING_PERIOD} ]]; then
say "$(printf "%-21s : %s - ${ORANGE}%s${NC} %s until expiration" "KES expiration date" "${expiration_date}" "WARNING!" "$(showTimeLeft ${expiration_time_sec_diff})")" "log"
else
say "$(printf "%-21s : %s" "KES key expiration date" "${expiration_date}")" "log"
say "$(printf "%-21s : %s" "KES expiration date" "${expiration_date}")" "log"
fi
fi
done < <(find "${POOL_FOLDER}" -mindepth 1 -maxdepth 1 -type d -print0 | sort -z)
Expand Down Expand Up @@ -2127,7 +2127,7 @@ case $OPERATION in
elif [[ ${expiration_time_sec_diff} -lt ${KES_WARNING_PERIOD} ]]; then
say "$(printf "%-21s : %s - ${ORANGE}%s${NC} %s until expiration" "KES expiration date" "${expiration_date}" "WARNING!" "$(showTimeLeft ${expiration_time_sec_diff})")" "log"
else
say "$(printf "%-21s : %s" "KES key expiration date" "${expiration_date}")" "log"
say "$(printf "%-21s : %s" "KES expiration date" "${expiration_date}")" "log"
fi
fi
# get owners
Expand Down
10 changes: 5 additions & 5 deletions scripts/cnode-helper-scripts/sendADA.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ fi

getBalance ${S_ADDR}
if [[ ${lovelace} -gt 0 ]]; then
say "$(printf "\n%s\t${CYAN}%s${NC} ADA" "Funds in source wallet:" "$(numfmt --grouping ${ada})")" "log"
say "$(printf "\n%s\t${CYAN}%s${NC} ADA" "Funds in source wallet:" "$(formatLovelace ${lovelace})")" "log"
else
say "${RED}ERROR${NC}: no funds available in source address"
echo "" && exit 1
Expand All @@ -87,7 +87,7 @@ if [[ ${LOVELACE} != "all" ]]; then
fi
else
LOVELACE=${lovelace}
say "$(printf "\n%s\t${CYAN}%s${NC} ADA" "ADA to send set to total supply:" "$(numfmt --grouping ${ada})")" "log"
say "$(printf "\n%s\t${CYAN}%s${NC} ADA" "ADA to send set to total supply:" "$(formatLovelace ${lovelace})")" "log"
INCL_FEE="yes"
fi

Expand All @@ -103,16 +103,16 @@ getBalance ${S_ADDR}

while [[ ${lovelace} -ne ${newBalance} ]]; do
say ""
say "${ORANGE}WARN${NC}: Balance mismatch, transaction not included in latest block ($(numfmt --grouping ${lovelace}) != $(numfmt --grouping ${newBalance}))"
say "${ORANGE}WARN${NC}: Balance mismatch, transaction not included in latest block ($(formatLovelace ${lovelace}) != $(formatLovelace ${newBalance}))"
if ! waitNewBlockCreated; then
echo "" && exit 1
fi
getBalance ${S_ADDR}
done

say "$(printf "\n%s\t\t${CYAN}%s${NC} ADA" "Funds in source wallet:" "$(numfmt --grouping ${ada})")" "log"
say "$(printf "\n%s\t\t${CYAN}%s${NC} ADA" "Funds in source wallet:" "$(formatLovelace ${lovelace})")" "log"

getBalance ${D_ADDR}
say "$(printf "%s\t${CYAN}%s${NC} ADA" "Funds in destination wallet:" "$(numfmt --grouping ${ada})")" "log"
say "$(printf "%s\t${CYAN}%s${NC} ADA" "Funds in destination wallet:" "$(formatLovelace ${lovelace})")" "log"

say "\n## Finished! ##\n"

0 comments on commit 0d25405

Please sign in to comment.