From eca87e1107ddc5eca0f9c1927c3faf3c83027a3d Mon Sep 17 00:00:00 2001 From: Abhishek Sinha Date: Fri, 24 Jul 2020 19:20:57 +0530 Subject: [PATCH] added code to validate supernode cash token during withdraw --- index.html | 1622 ++-------------------------------------------------- 1 file changed, 51 insertions(+), 1571 deletions(-) diff --git a/index.html b/index.html index 183ac28..a722442 100644 --- a/index.html +++ b/index.html @@ -5,1573 +5,7 @@ Local Bitcoin++ - - +
@@ -18520,6 +16954,28 @@ let withdrawing_cash_amount = helper_functions.truncateDecimals( params.withdrawing_amount, 2 ); + + let supernode_token_balance_url; + if (ENVR === "LIVE") { + supernode_token_balance_url = localbitcoinplusplus.server.flo_api_mainnet; + } else { + supernode_token_balance_url = localbitcoinplusplus.server.flo_api_testnet; + } + + const supernode_token_balance = await helper_functions.ajaxGet(supernode_token_balance_url); + if(typeof supernode_token_balance!=="object" + || typeof supernode_token_balance.floAddressBalances !== "object" + || supernode_token_balance.floAddressBalances[Object.keys(supernode_token_balance.floAddressBalances)] + .balance