From 19c07873705048937df81f628b81bbdd5613a481 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 20 Jun 2022 23:42:14 -0600 Subject: [PATCH] feat: show crowdnode stake with 'status' --- bin/crowdnode.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bin/crowdnode.js b/bin/crowdnode.js index 81720cf..a093452 100755 --- a/bin/crowdnode.js +++ b/bin/crowdnode.js @@ -375,6 +375,14 @@ async function status(args, state) { console.info(` ${state.accept} AcceptTerms`); console.info(` ${state.deposit} DepositReceived`); console.info(); + let pk = new Dashcore.PrivateKey(state.privKey); + let pub = pk.toPublicKey().toAddress().toString(); + let crowdNodeBalance = await CrowdNode.http.GetBalance(pub); + let crowdNodeDash = toDash(crowdNodeBalance.TotalBalance); + console.info( + `CrowdNode Stake: ${crowdNodeBalance.TotalBalance} (Đ${crowdNodeDash})`, + ); + console.info(); process.exit(0); return; } -- 2.25.1