Skip to content

Commit f237614

Browse files
committed
Hot-Fix Update for 01_claimRewards in OfflineMode
HotFix: - Script was not able to claim rewards in offline mode, this was caused to a reordering of checks in regards of the DRep-Delegation requirement, fixed now.
1 parent fdada40 commit f237614

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

cardano/mainnet/01_claimRewards.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@ showToAddr=${adahandleName:-"${toAddr}.addr"} #shows the adahandle instead of th
252252

253253
stakingAddr=$(cat ${stakeAddr}.addr); check_address "${stakingAddr}"
254254

255-
256255
echo -e "\e[0mClaim Staking Rewards from Address\e[32m ${stakeAddr}.addr\e[0m to Address\e[32m ${showToAddr}\e[0m with funds from Address\e[32m ${fromAddr}.addr\e[0m"
257256
echo
258257

@@ -262,9 +261,9 @@ ttl=$(( ${currentTip} + ${defTTL} ))
262261

263262
#Read ProtocolParameters
264263
case ${workMode} in
265-
"online") protocolParametersJSON=$(${cardanocli} ${cliEra} query protocol-parameters );; #onlinemode
264+
"online") protocolParametersJSON=$(${cardanocli} ${cliEra} query protocol-parameters);; #onlinemode
266265
"light") protocolParametersJSON=${lightModeParametersJSON};; #lightmode
267-
"offline") protocolParametersJSON=$(jq ".protocol.parameters" <<< ${offlineJSON});; #offlinemode
266+
"offline") readOfflineFile; protocolParametersJSON=$(jq ".protocol.parameters" <<< ${offlineJSON});; #offlinemode
268267
esac
269268
checkError "$?"; if [ $? -ne 0 ]; then exit $?; fi
270269

@@ -292,7 +291,7 @@ if [[ "${sendFromAddr}" == "${sendToAddr}" ]]; then rxcnt="1"; else rxcnt="2"; e
292291
if [ $? -ne 0 ]; then stopProcessAnimation; echo -e "\e[35mERROR - ${rewardsJSON}\e[0m\n"; exit $?; else stopProcessAnimation; fi;
293292
;;
294293

295-
"offline") readOfflineFile; #Reads the offlinefile into the offlineJSON variable
294+
"offline") #Reads the offlinefile into the offlineJSON variable
296295
rewardsJSON=$(jq -r ".address.\"${stakingAddr}\".rewardsJSON" <<< ${offlineJSON} 2> /dev/null)
297296
if [[ "${rewardsJSON}" == null ]]; then echo -e "\e[35mAddress not included in the offline transferFile, please include it first online!\e[0m\n"; exit; fi
298297
;;

cardano/mainnet/sha256sum_sposcripts.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
914c17619c450e6c0ddef3c632e39288e6d50475a5932a37a09fe7131c43d968 00_common.sh
2-
6e5569a1e90968ce174a1609bda86fbe233f197e57eff79f5158354ad605c4bc 01_claimRewards.sh
2+
3f5685d008f29a31085082f72670de881ecb89b7c549b260e1a0771bd6c69ecf 01_claimRewards.sh
33
8f98ef3f0983ed12ba714390b9a528ccf06b41f51dfcd1d52c50d86f038455c8 01_protectKey.sh
44
0bf24a499ccc8f6665cc9b5b2e40f8af3f653656b23cd5e3eb99e27ac9279678 01_queryAddress.sh
55
975254444420291bbe3eafe50cba4d09e08ca9fa939da99c63803f0020a36679 01_sendAssets.sh

cardano/testnet/01_claimRewards.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@ showToAddr=${adahandleName:-"${toAddr}.addr"} #shows the adahandle instead of th
252252

253253
stakingAddr=$(cat ${stakeAddr}.addr); check_address "${stakingAddr}"
254254

255-
256255
echo -e "\e[0mClaim Staking Rewards from Address\e[32m ${stakeAddr}.addr\e[0m to Address\e[32m ${showToAddr}\e[0m with funds from Address\e[32m ${fromAddr}.addr\e[0m"
257256
echo
258257

@@ -262,9 +261,9 @@ ttl=$(( ${currentTip} + ${defTTL} ))
262261

263262
#Read ProtocolParameters
264263
case ${workMode} in
265-
"online") protocolParametersJSON=$(${cardanocli} ${cliEra} query protocol-parameters );; #onlinemode
264+
"online") protocolParametersJSON=$(${cardanocli} ${cliEra} query protocol-parameters);; #onlinemode
266265
"light") protocolParametersJSON=${lightModeParametersJSON};; #lightmode
267-
"offline") protocolParametersJSON=$(jq ".protocol.parameters" <<< ${offlineJSON});; #offlinemode
266+
"offline") readOfflineFile; protocolParametersJSON=$(jq ".protocol.parameters" <<< ${offlineJSON});; #offlinemode
268267
esac
269268
checkError "$?"; if [ $? -ne 0 ]; then exit $?; fi
270269

@@ -292,7 +291,7 @@ if [[ "${sendFromAddr}" == "${sendToAddr}" ]]; then rxcnt="1"; else rxcnt="2"; e
292291
if [ $? -ne 0 ]; then stopProcessAnimation; echo -e "\e[35mERROR - ${rewardsJSON}\e[0m\n"; exit $?; else stopProcessAnimation; fi;
293292
;;
294293

295-
"offline") readOfflineFile; #Reads the offlinefile into the offlineJSON variable
294+
"offline") #Reads the offlinefile into the offlineJSON variable
296295
rewardsJSON=$(jq -r ".address.\"${stakingAddr}\".rewardsJSON" <<< ${offlineJSON} 2> /dev/null)
297296
if [[ "${rewardsJSON}" == null ]]; then echo -e "\e[35mAddress not included in the offline transferFile, please include it first online!\e[0m\n"; exit; fi
298297
;;

0 commit comments

Comments
 (0)