From b6a11cd6f2a4023196f138d39dc158707a15b1b4 Mon Sep 17 00:00:00 2001 From: Helder Oliveira Date: Wed, 18 Oct 2023 12:18:06 +0100 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20FLK=20precision=20calcu?= =?UTF-8?q?lator?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/node_details | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/node_details b/scripts/node_details index 41a76cf..245ede9 100644 --- a/scripts/node_details +++ b/scripts/node_details @@ -23,12 +23,17 @@ defaultLightningKeystoreConsensusPemFilename="consensus.pem" defaultLightningKeystoreNodePemPath="$defaultLightningKeystorePath/$defaultLightningKeystoreNodePemFilename" defaultLightningKeystoreConsensusPemPath="$defaultLightningKeystorePath/$defaultLightningKeystoreConsensusPemFilename" defaultRPCUrl="https://rpc.testnet.fleek.network/rpc/v0" +defaultUnitPrecision="10^18" # Utils hasCommand() { command -v "$1" >/dev/null 2>&1 } +flkMinorUnitToFlk() { + echo "$1 / $defaultUnitPrecision" | bc +} + # The white space before and after is intentional cat << "ART" @@ -103,7 +108,9 @@ echo "The Consensus Public Key is $consensusPubKey" echo "The Node Server IP address is $ipAddr" if [[ ! "$hasStake" -eq "" ]]; then - echo "The Node staked amount is $hasStake" + flkAmount=$(flkMinorUnitToFlk "$hasStake") + + echo "The Node staked amount is $flkAmount FLK" fi echo