From 5d9e99d65a4714fa0391d8fe8ef9f934236e8330 Mon Sep 17 00:00:00 2001 From: Helder Oliveira Date: Tue, 17 Oct 2023 19:37:33 +0100 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20node=20stake=20amount?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/node_details | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/node_details b/scripts/node_details index cec2fd1..9e20524 100644 --- a/scripts/node_details +++ b/scripts/node_details @@ -91,10 +91,10 @@ nodePubKey=$(echo "$keys" | sed -n '1p' | cut -d : -f 2 | xargs) consensusPubKey=$(echo "$keys" | sed -n '1p' | cut -d : -f 2 | xargs) ipAddr=$(curl -sw '\n' ifconfig.me || curl -sw '\n' ident.me) # TODO: Show if stake -# hasStake=$(curl -X POST \ -# "$defaultRPCUrl" \ -# -H 'Content-Type: application/json' \ -# -d "{\"id\":1,\"jsonrpc\":\"2.0\",\"method\":\"flk_get_node_info\",\"params\":[\"$nodePubKey\"]}") +hasStake=$(curl -X POST \ + "$defaultRPCUrl" \ + -H 'Content-Type: application/json' \ + -d "{\"id\":1,\"jsonrpc\":\"2.0\",\"method\":\"flk_get_node_info\",\"params\":[\"$nodePubKey\"]}" | grep -Eo '"staked"[^,]*' | grep -Eo '[^:]*$' | cut -d "\"" -f 2) echo "🤖 Your server details are the following" echo @@ -102,6 +102,10 @@ echo "The Node Public Key is $nodePubKey" echo "The Consensus Public Key is $consensusPubKey" echo "The Node Server IP address is $ipAddr" +if $hasStake; then + echo "The Node staked amount is $hasStake" +fi + echo echo "Learn more by checking our guides at https://docs.fleek.network" echo "✨ That's all!" \ No newline at end of file