From 947367fe21a84240f222a06088a5bdda2e07a9bd Mon Sep 17 00:00:00 2001 From: BogBogdan Date: Mon, 23 Dec 2024 14:04:33 +0100 Subject: [PATCH 1/2] added ask in installer --- installer/installer.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/installer/installer.sh b/installer/installer.sh index 77754cc11a..ce377fee30 100755 --- a/installer/installer.sh +++ b/installer/installer.sh @@ -420,6 +420,7 @@ install_node() { # Function to configure a blockchain configure_blockchain() { + local blockchain=$1 local blockchain_id=$2 @@ -437,6 +438,16 @@ install_node() { validate_operator_fees $blockchain + # ASK part + read -p "Enter the fee your node requires for the transaction or service: " NODE_FEE + if (( $(echo "$NODE_FEE > 0" | bc -l) )); then + text_color $GREEN "The fee your node requires is: $NODE_FEE" + break # Izaći iz petlje ako je uslov ispunjen + else + text_color $RED "The fee must be greater than 0. Please enter a valid fee." + fi + done + local RPC_ENDPOINT="" if [ "$blockchain" == "gnosis" ] || [ "$blockchain" == "base" ]; then read -p "Enter your $blockchain RPC endpoint: " RPC_ENDPOINT @@ -451,7 +462,8 @@ install_node() { "evmManagementWalletPublicKey": "$EVM_MANAGEMENT_WALLET", "sharesTokenName": "$SHARES_TOKEN_NAME", "sharesTokenSymbol": "$SHARES_TOKEN_SYMBOL", - "operatorFee": $OPERATOR_FEE + "operatorFee": $OPERATOR_FEE, + "nodeFee": $NODE_FEE } } EOF @@ -465,6 +477,8 @@ EOF mv $CONFIG_DIR/origintrail_noderc_tmp $CONFIG_DIR/.origintrail_noderc } + + # Configure selected blockchains for blockchain in "${selected_blockchains[@]}"; do case "$blockchain" in From 7831d728d651c22304ef103a37f08a1f91649bf6 Mon Sep 17 00:00:00 2001 From: BogBogdan Date: Mon, 23 Dec 2024 14:11:39 +0100 Subject: [PATCH 2/2] deleted comment --- installer/installer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/installer.sh b/installer/installer.sh index ce377fee30..bb4e186b83 100755 --- a/installer/installer.sh +++ b/installer/installer.sh @@ -442,7 +442,7 @@ install_node() { read -p "Enter the fee your node requires for the transaction or service: " NODE_FEE if (( $(echo "$NODE_FEE > 0" | bc -l) )); then text_color $GREEN "The fee your node requires is: $NODE_FEE" - break # Izaći iz petlje ako je uslov ispunjen + break else text_color $RED "The fee must be greater than 0. Please enter a valid fee." fi