zeroconf settings GUI update

This commit is contained in:
satindergrewal 2017-11-25 12:23:08 +13:00
parent ceb73ea5bc
commit 77eaa357fb
5 changed files with 348 additions and 77 deletions

Binary file not shown.

View File

@ -436,86 +436,128 @@
<div class="col-sm-6">
<div class="row">
<div class="col-sm-12">
<div class="panel panel-default">
<div class="panel with-nav-tabs panel-default">
<div class="panel-heading">
<h3 class="panel-title"><strong>Trading Pair</strong></h3>
<button class="btn btn-xs btn-refreshtrading_pair coinexchange" data-coin="COIN" style="float: right; margin: -20px -8px;"><span class="glyphicon glyphicon-refresh" aria-hidden="true"></span></button>
<ul class="nav nav-tabs">
<li class="active"><a href="#exchange_trading_pair" data-toggle="tab">Trading Pair <button class="btn btn-xs btn-refreshtrading_pair coinexchange" data-coin="COIN"><span class="glyphicon glyphicon-refresh" aria-hidden="true"></span></button></a></li>
<li><a href="#exchange_zeroconf_settings" data-toggle="tab">ZeroConf Settings <button class="btn btn-xs btn-refreshzeroconf_settings"><span class="glyphicon glyphicon-refresh" aria-hidden="true"></span></button></a></li>
</ul>
</div>
<div class="panel-body"> <!-- panel-body -->
<div class=""> <!-- panel-body -->
<div class="tab-content">
<div class="tab-pane fade in active" id="exchange_trading_pair" style="padding: 15px;">
<div class="row">
<div class="col-sm-12">
<div class="form-group trading_buysell_options">
<div class="btn-group btn-group-justified colors" data-toggle="buttons">
<label class="btn btn-lg btn-info active">
<input type="radio" name="trading_pair_options" id="trading_pair_options_buying" value="buying" autocomplete="off" checked> BUYING <span class="coin_ticker"></span></label>
<label class="btn btn-lg btn-info">
<input type="radio" name="trading_pair_options" id="trading_pair_options_selling" value="selling" autocomplete="off"> SELLING <span class="coin_ticker"></span></label>
</div>
</div>
<div class="form-group trading_method_options">
<div class="btn-group btn-group-justified colors" data-toggle="buttons">
<label class="btn btn-lg btn-warning active">
<input type="radio" name="trading_mode_options" id="trading_mode_options_tradebot" value="tradebot" autocomplete="off"> TRADE BOT</label>
<label class="btn btn-lg btn-warning">
<input type="radio" name="trading_mode_options" id="trading_mode_options_trademanual" value="trademanual" autocomplete="off"> MANUAL TRADE</label>
<label class="btn btn-lg btn-warning">
<input type="radio" name="trading_mode_options" id="trading_mode_options_tradeportfolio" value="tradeportfolio" autocomplete="off"> PORTFOLIO</label>
</div>
</div>
<div class="form-group">
<span style="float: left; font-size: 18px;"><span class="trading_pair_lable_text_one">Max</span> Price to <span class="trading_pair_lable_text_two">Buy</span></span>
</div>
<div class="input-group col-sm-12">
<select class="selectpicker trading_pair_coin" data-live-search="true" data-hide-disabled="true" data-width="30%"></select>
<span class="input-group-addon trading_pair_coin_autoprice_mode_span" style="font-size: 0px; margin: 0; padding: 0; width: 120px; background-color: #fff; border: 0;">
<input class="toggle_checkbox toggle_font_lg" id="trading_pair_coin_autoprice_mode" type="checkbox" checked data-toggle="toggle" data-on="Margin" data-off="Fixed" data-size="large" data-onstyle="primary" data-offstyle="info" data-width="100%" data-height="64px" data-class="toggle-font-lg">
</span>
<input type="number" class="form-control trading_pair_coin_price" placeholder="Price e.g. 0.01" style="height: 64px; font-size: 20px;">
<span class="input-group-addon" id="trading_pair_coin_price_max_min" style="font-size: 20px;">Max</span>
</div>
<div class="form-group trading_selected_trader_label" style="margin-top: 15px; margin-bottom: 0px; display: none;">
<span style="font-size: 18px;">Trade with selected trader only (optional)</span>
</div>
<div class="input-group col-sm-12 trading_selected_trader" style="display: none;">
<span class="input-group-addon">
<input class="big-checkbox trading_pair_destpubkey_yesno" type="checkbox"> Yes
</span>
<input type="text" class="form-control trading_pair_destpubkey" placeholder="eg. bab6ad2eebe1e666369cab504d4622b22c1f1ef718ef388e88020f30a1573e01" style="height: 64px; font-size: 20px;">
</div>
<div class="form-group buy_sell_amount_to" style="margin-top: 15px; margin-bottom: 0px;">
<span style="font-size: 18px;"><span>Max</span> Amount to <span class="trading_pair_lable_text_two">Buy</span></span>
</div>
<div class="input-group col-sm-12 buy_sell_button_div">
<p class="portfolio_info_text" style="font-size: 20px; font-weight: 200;"></p>
<span class="input-group-addon coin_ticker" id="trading_pair_coin_ticker" style="font-size: 20px;"></span>
<input type="number" class="form-control trading_pair_coin_volume" placeholder="Amount e.g. 12.5" style="height: 64px; font-size: 20px;">
<span class="input-group-btn">
<button class="btn btn-primary btn-bot_action" data-action="buy" style="height: 64px; font-size: 20px;">BUY</button>
</span>
</div>
<div class="input-group col-sm-12">
<span class="input-group-addon relvol_basevol_label" style="font-size: 30px; font-weight: 200; border: 0; background-color: #fff;">It'll cost you</span>
<span class="input-group-addon relvol_basevol_amount" style="font-size: 40px; font-weight: 100; border: 0; background-color: #fff;"><span class="relvol_basevol">0</span> <span class="relvol_basevol_coin" style="font-size: 25px; background-color: #fff; font-weight: 100;"></span></span>
</div>
<div class="form-group coingoal_label_div" style="margin-top: 15px; margin-bottom: 0px; display: none;">
<span style="font-size: 18px;">Set <span class="coingoal_label_coin_name"></span> Goal percentage for your portfolio</span>
</div>
<div class="input-group col-sm-12 coingoal_div" style="display: none;">
<span class="input-group-addon coin_ticker" id="coingoal_coin_ticker" style="font-size: 20px;"></span>
<input type="number" class="form-control coingoal_percentage" placeholder="e.g. 12.5" style="height: 64px; font-size: 20px;">
<span class="input-group-btn">
<button class="btn btn-primary btn_set_coin_goal" data-action="goal" data-auto=false style="height: 64px; font-size: 20px;">SET GOAL</button>
</span>
</div>
<div class="row">
<div class="col-sm-12">
<div class="form-group trading_buysell_options">
<div class="btn-group btn-group-justified colors" data-toggle="buttons">
<label class="btn btn-lg btn-info active">
<input type="radio" name="trading_pair_options" id="trading_pair_options_buying" value="buying" autocomplete="off" checked> BUYING <span class="coin_ticker"></span></label>
<label class="btn btn-lg btn-info">
<input type="radio" name="trading_pair_options" id="trading_pair_options_selling" value="selling" autocomplete="off"> SELLING <span class="coin_ticker"></span></label>
</div>
</div>
<div class="form-group trading_method_options">
<div class="btn-group btn-group-justified colors" data-toggle="buttons">
<label class="btn btn-lg btn-warning active">
<input type="radio" name="trading_mode_options" id="trading_mode_options_tradebot" value="tradebot" autocomplete="off"> TRADE BOT</label>
<label class="btn btn-lg btn-warning">
<input type="radio" name="trading_mode_options" id="trading_mode_options_trademanual" value="trademanual" autocomplete="off"> MANUAL TRADE</label>
<label class="btn btn-lg btn-warning">
<input type="radio" name="trading_mode_options" id="trading_mode_options_tradeportfolio" value="tradeportfolio" autocomplete="off"> PORTFOLIO</label>
</div>
</div>
<div class="form-group">
<span style="float: left; font-size: 18px;"><span class="trading_pair_lable_text_one">Max</span> Price to <span class="trading_pair_lable_text_two">Buy</span></span>
</div>
<div class="input-group col-sm-12">
<select class="selectpicker trading_pair_coin" data-live-search="true" data-hide-disabled="true" data-width="30%"></select>
<span class="input-group-addon trading_pair_coin_autoprice_mode_span" style="font-size: 0px; margin: 0; padding: 0; width: 120px; background-color: #fff; border: 0;">
<input class="toggle_checkbox toggle_font_lg" id="trading_pair_coin_autoprice_mode" type="checkbox" checked data-toggle="toggle" data-on="Margin" data-off="Fixed" data-size="large" data-onstyle="primary" data-offstyle="info" data-width="100%" data-height="64px" data-class="toggle-font-lg">
</span>
<input type="number" class="form-control trading_pair_coin_price" placeholder="Price e.g. 0.01" style="height: 64px; font-size: 20px;">
<span class="input-group-addon" id="trading_pair_coin_price_max_min" style="font-size: 20px;">Max</span>
</div>
<div class="form-group trading_selected_trader_label" style="margin-top: 15px; margin-bottom: 0px; display: none;">
<span style="font-size: 18px;">Trade with selected trader only (optional)</span>
</div>
<div class="input-group col-sm-12 trading_selected_trader" style="display: none;">
<span class="input-group-addon">
<input class="big-checkbox trading_pair_destpubkey_yesno" type="checkbox"> Yes
</span>
<input type="text" class="form-control trading_pair_destpubkey" placeholder="eg. bab6ad2eebe1e666369cab504d4622b22c1f1ef718ef388e88020f30a1573e01" style="height: 64px; font-size: 20px;">
</div>
<div class="form-group buy_sell_amount_to" style="margin-top: 15px; margin-bottom: 0px;">
<span style="font-size: 18px;"><span>Max</span> Amount to <span class="trading_pair_lable_text_two">Buy</span></span>
</div>
<div class="input-group col-sm-12 buy_sell_button_div">
<p class="portfolio_info_text" style="font-size: 20px; font-weight: 200;"></p>
<span class="input-group-addon coin_ticker" id="trading_pair_coin_ticker" style="font-size: 20px;"></span>
<input type="number" class="form-control trading_pair_coin_volume" placeholder="Amount e.g. 12.5" style="height: 64px; font-size: 20px;">
<span class="input-group-btn">
<button class="btn btn-primary btn-bot_action" data-action="buy" style="height: 64px; font-size: 20px;">BUY</button>
</span>
</div>
<div class="input-group col-sm-12">
<span class="input-group-addon relvol_basevol_label" style="font-size: 30px; font-weight: 200; border: 0; background-color: #fff;">It'll cost you</span>
<span class="input-group-addon relvol_basevol_amount" style="font-size: 40px; font-weight: 100; border: 0; background-color: #fff;"><span class="relvol_basevol">0</span> <span class="relvol_basevol_coin" style="font-size: 25px; background-color: #fff; font-weight: 100;"></span></span>
</div>
<div class="form-group coingoal_label_div" style="margin-top: 15px; margin-bottom: 0px; display: none;">
<span style="font-size: 18px;">Set <span class="coingoal_label_coin_name"></span> Goal percentage for your portfolio</span>
</div>
<div class="input-group col-sm-12 coingoal_div" style="display: none;">
<span class="input-group-addon coin_ticker" id="coingoal_coin_ticker" style="font-size: 20px;"></span>
<input type="number" class="form-control coingoal_percentage" placeholder="e.g. 12.5" style="height: 64px; font-size: 20px;">
<span class="input-group-btn">
<button class="btn btn-primary btn_set_coin_goal" data-action="goal" data-auto=false style="height: 64px; font-size: 20px;">SET GOAL</button>
</span>
</div>
</div>
<div class="tab-pane fade" id="exchange_zeroconf_settings">
<div class="row" style="padding: 15px;">
<div class="col-sm-12">
<div class="form-group">
<span style="float: left; font-size: 18px;">Deposit ZeroConf Security</span>
</div>
<div class="input-group col-sm-12">
<select class="selectpicker zeroconf_weeks_select" data-live-search="true" data-hide-disabled="true" data-width="30%"></select>
<input type="number" class="form-control zeroconf_deposit_amount" value="10">
<span class="input-group-addon">KMD</span>
</div>
<div class="form-group">
<span style="float: left; font-size: 18px;"></span>
</div>
<div class="input-group col-sm-12">
<button class="btn btn-primary btn-block btn_zeroconf_deposit">DEPOSIT ZEROCONF SECURITY</button>
</div>
</div>
</div>
<table class="table table-striped zeroconf_deposits_history_tbl" width="100%" style="margin-bottom: 0;">
<thead>
<!--<th>Index</th>-->
<th>Details</th>
<th>Actions</th>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
</div>
</div>
@ -619,6 +661,7 @@
<script src="js/jquery.min.js" type="text/javascript"></script>
<script src="js/coin_select_options.js" type="text/javascript"></script>
<script src="js/login_select_options.js" type="text/javascript"></script>
<script src="js/zeroconf_weeks_select_options.js" type="text/javascript"></script>
<script src="js/coin_names.js" type="text/javascript"></script>
<script src="js/ipc-actions.js" type="text/javascript"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->

View File

@ -211,6 +211,8 @@ $('.porfolio_coins_list tbody').on('click', '.btn-portfoliogo', function() {
bot_screen_coin_balance();
bot_screen_sellcoin_balance_Interval = setInterval(bot_screen_sellcoin_balance, 30000);
bot_screen_sellcoin_balance();
getZeroConfDepositHistory();
});
@ -5030,4 +5032,169 @@ function constructTradesHistory() {
});
}
/* TRADE HISTORY - CREDIT: pbca26 END*/
/* TRADE HISTORY - CREDIT: pbca26 END*/
/* ZEROCONF SETTINGS */
$('.btn-refreshzeroconf_settings').click(function(){
getZeroConfDepositHistory();
});
$('.zeroconf_deposits_history_tbl tbody').on('click', '.zconf_deposit_txid_link', function(e) {
e.preventDefault();
console.log('zconf_deposit_txid_link clicked');
console.log($(this).data());
shell.openExternal('https://kmd.explorer.supernet.org/tx/'+$(this).data('txid'));
});
$('.zeroconf_deposits_history_tbl tbody').on('click', '.zconf_deposit_details', function(e) {
e.preventDefault();
console.log('zconf_deposit_details clicked');
console.log($(this).data());
});
$('.zeroconf_deposits_history_tbl tbody').on('click', '.zconf_deposit_claim', function(e) {
e.preventDefault();
console.log('zconf_deposit_claim clicked');
console.log($(this).data());
var addr = $(this).data('address');
var expr = $(this).data('expiration');
ZeroConfClaim(addr, expr);
});
$('.btn_zeroconf_deposit').click(function(e){
e.preventDefault();
console.log('btn_zeroconf_deposit clicked');
var deposit_weeks = $('.zeroconf_weeks_select').selectpicker('val');
var deposit_amount = $('.zeroconf_deposit_amount').val();
console.log(deposit_weeks);
console.log(deposit_amount);
ZeroConfDeposit(deposit_weeks,deposit_amount);
});
$('.zeroconf_deposit_amount').keyup(function(){
var deposit_amount = $('.zeroconf_deposit_amount').val();
//console.log(deposit_amount);
var empty = false;
if (deposit_amount < 10) {
console.log('Send Address is empty or less than 10');
empty = true;
}
//console.log(empty);
if (empty){
$('.btn_zeroconf_deposit').attr("disabled", "disabled");
} else {
$('.btn_zeroconf_deposit').removeAttr("disabled");
}
});
function getZeroConfDepositHistory(){
var zeroconf_deposit_history_data = ShepherdIPC({"command":"read_zeroconf_log", "type":"deposit"});
//console.log(zeroconf_deposit_history_data);
$('.zeroconf_deposits_history_tbl tbody').empty();
$.each(zeroconf_deposit_history_data, function(index, val) {
//console.log(index);
//console.log(val);
if(!val.error === false) {
var zeroconf_deposits_history_tr = '';
zeroconf_deposits_history_tr += '<tr>';
//zeroconf_deposits_history_tr += '<td>' + index + '</td>';
zeroconf_deposits_history_tr += '<td><div style="color: #e53935; font-size: 15px;"><span class="glyphicon glyphicon-remove-circle" aria-hidden="true"></span> error</div></td>';
zeroconf_deposits_history_tr += '<td>-</td>';
zeroconf_deposits_history_tr += '</tr>';
$('.zeroconf_deposits_history_tbl tbody').append(zeroconf_deposits_history_tr);
} else {
var expiration_time = new Date( val.expiration *1000);
var zeroconf_deposits_history_tr = '';
zeroconf_deposits_history_tr += '<tr>';
//zeroconf_deposits_history_tr += '<td>' + index + '</td>';
zeroconf_deposits_history_tr += `<td>
<b>Address:</b> ${val.address}<br>
<b>Deposit:</b> ${val.deposit} KMD<br>
<b>Expiration:</b> ${expiration_time}<br>
<b>Transaction ID:</b> <a class="zconf_deposit_txid_link" href="#" data-txid="${val.txid}">Open in Explorer</a>
</td>`;
zeroconf_deposits_history_tr += `<td><button class="btn btn-xs btn-default zconf_deposit_details" data-address="` + val.address + `" data-expiration="` + val.expiration + `">Details</button>
<button class="btn btn-xs btn-success zconf_deposit_claim" data-address="` + val.address + `" data-expiration="` + val.expiration + `" style="margin: 3px;">Claim Deposit</button>
</td>`;
zeroconf_deposits_history_tr += '</tr>';
$('.zeroconf_deposits_history_tbl tbody').append(zeroconf_deposits_history_tr);
}
});
}
function ZeroConfDeposit(deposit_weeks, deposit_amount) {
var userpass = sessionStorage.getItem('mm_userpass');
var mypubkey = sessionStorage.getItem('mm_mypubkey');
var ajax_data = {"userpass":userpass,"method":"zeroconf_deposit","weeks":deposit_weeks,"amount":deposit_amount,"broadcast": 1};
var url = "http://127.0.0.1:7783";
$.ajax({
async: true,
data: JSON.stringify(ajax_data),
dataType: 'json',
type: 'POST',
url: url
}).done(function(zconf_deposit_data) {
console.log(zconf_deposit_data);
var update_deposit_log_file = ShepherdIPC({"command":"update_zeroconf_log", "data":{"logdata": JSON.stringify(zconf_deposit_data),"type":"deposit"}});
console.log(update_deposit_log_file);
if (!zconf_deposit_data.error === false) {
toastr.error(zconf_deposit_data.error, 'ZeroConf Notification');
}
if (zconf_deposit_data.result == 'success') {
bootbox.alert(`<b>Address: </b> ${zconf_deposit_data.address}<br>
<b>deposit: </b> ${zconf_deposit_data.deposit}<br>
<b>expiration: </b> ${zconf_deposit_data.expiration}<br>
<a href="#" onclick="shell.openExternal(https://kmd.explorer.supernet.org/tx/'`+zconf_deposit_data.txid+`'); return false;">` + zconf_deposit_data.txid + `</a>`);
getZeroConfDepositHistory();
}
}).fail(function(jqXHR, textStatus, errorThrown) {
// If fail
console.log(textStatus + ': ' + errorThrown);
});
}
function ZeroConfClaim(claim_address, claim_expiration) {
var userpass = sessionStorage.getItem('mm_userpass');
var mypubkey = sessionStorage.getItem('mm_mypubkey');
var ajax_data = {"userpass":userpass,"method":"zeroconf_claim","address":claim_address,"expiration":claim_expiration};
var url = "http://127.0.0.1:7783";
$.ajax({
async: true,
data: JSON.stringify(ajax_data),
dataType: 'json',
type: 'POST',
url: url
}).done(function(zconf_claim_data) {
console.log(zconf_claim_data);
var update_claim_log_file = ShepherdIPC({"command":"update_zeroconf_log", "data":{"logdata": JSON.stringify(zconf_claim_data),"type":"claim"}});
console.log(update_claim_log_file);
if (!zconf_claim_data.error === false) {
toastr.error(zconf_claim_data.error, 'ZeroConf Notification');
}
if (zconf_claim_data.result == 'success') {
bootbox.alert(`<b>Claimed: </b> ${zconf_claim_data.claimed}<br>
<a href="#" onclick="shell.openExternal(https://kmd.explorer.supernet.org/tx/'`+zconf_claim_data.txids+`'); return false;">` + zconf_claim_data.txids + `</a>`);
}
}).fail(function(jqXHR, textStatus, errorThrown) {
// If fail
console.log(textStatus + ': ' + errorThrown);
});
}
/* ZEROCONF SETTINGS END */

View File

@ -0,0 +1,61 @@
var zeroconf_weeks_select_options = '';
zeroconf_weeks_select_options = `
<option data-content="0 Week" data-tokens="0 week">0</option>
<option data-content="1 Week" data-tokens="1 week">1</option>
<option data-content="2 Weeks" data-tokens="2 week">2</option>
<option data-content="3 Weeks" data-tokens="3 week">3</option>
<option data-content="4 Weeks" data-tokens="4 week">4</option>
<option data-content="5 Weeks" data-tokens="5 week">5</option>
<option data-content="6 Weeks" data-tokens="6 week">6</option>
<option data-content="7 Weeks" data-tokens="7 week">7</option>
<option data-content="8 Weeks" data-tokens="8 week">8</option>
<option data-content="9 Weeks" data-tokens="9 week">9</option>
<option data-content="10 Weeks" data-tokens="10 week">10</option>
<option data-content="11 Weeks" data-tokens="11 week">11</option>
<option data-content="12 Weeks" data-tokens="12 week">12</option>
<option data-content="13 Weeks" data-tokens="13 week">13</option>
<option data-content="14 Weeks" data-tokens="14 week">14</option>
<option data-content="15 Weeks" data-tokens="15 week">15</option>
<option data-content="16 Weeks" data-tokens="16 week">16</option>
<option data-content="17 Weeks" data-tokens="17 week">17</option>
<option data-content="18 Weeks" data-tokens="18 week">18</option>
<option data-content="19 Weeks" data-tokens="19 week">19</option>
<option data-content="20 Weeks" data-tokens="20 week">20</option>
<option data-content="21 Weeks" data-tokens="21 week">21</option>
<option data-content="22 Weeks" data-tokens="22 week">22</option>
<option data-content="23 Weeks" data-tokens="23 week">23</option>
<option data-content="24 Weeks" data-tokens="24 week">24</option>
<option data-content="25 Weeks" data-tokens="25 week">25</option>
<option data-content="26 Weeks" data-tokens="26 week">26</option>
<option data-content="27 Weeks" data-tokens="27 week">27</option>
<option data-content="28 Weeks" data-tokens="28 week">28</option>
<option data-content="29 Weeks" data-tokens="29 week">29</option>
<option data-content="30 Weeks" data-tokens="30 week">30</option>
<option data-content="31 Weeks" data-tokens="31 week">31</option>
<option data-content="32 Weeks" data-tokens="32 week">32</option>
<option data-content="33 Weeks" data-tokens="33 week">33</option>
<option data-content="34 Weeks" data-tokens="34 week">34</option>
<option data-content="35 Weeks" data-tokens="35 week">35</option>
<option data-content="36 Weeks" data-tokens="36 week">36</option>
<option data-content="37 Weeks" data-tokens="37 week">37</option>
<option data-content="38 Weeks" data-tokens="38 week">38</option>
<option data-content="39 Weeks" data-tokens="39 week">39</option>
<option data-content="40 Weeks" data-tokens="40 week">40</option>
<option data-content="41 Weeks" data-tokens="41 week">41</option>
<option data-content="42 Weeks" data-tokens="42 week">42</option>
<option data-content="43 Weeks" data-tokens="43 week">43</option>
<option data-content="44 Weeks" data-tokens="44 week">44</option>
<option data-content="45 Weeks" data-tokens="45 week">45</option>
<option data-content="46 Weeks" data-tokens="46 week">46</option>
<option data-content="47 Weeks" data-tokens="47 week">47</option>
<option data-content="48 Weeks" data-tokens="48 week">48</option>
<option data-content="49 Weeks" data-tokens="49 week">49</option>
<option data-content="50 Weeks" data-tokens="50 week">50</option>
<option data-content="51 Weeks" data-tokens="51 week">51</option>
<option data-content="52 Weeks" data-tokens="52 week">52</option>
`;
$('.zeroconf_weeks_select').html(zeroconf_weeks_select_options);

View File

@ -340,11 +340,11 @@ UpdateZeroConfLogs = function(zeroconf_log_data) {
console.log('ZeroConf claim log updated!');
});
} else {
console.log(zconf_claim_log);
//console.log(zconf_claim_log);
JSON.parse(zeroconf_log_data.logdata)
zconf_claim_log.push(JSON.parse(zeroconf_log_data.logdata));
console.log('===============')
console.log(zconf_claim_log);
//console.log('===============')
//console.log(zconf_claim_log);
fs.writeJson(`${BarterDEXDir}/ZeroConf_Claim_logFile.log`, zconf_claim_log, function (err) {
if (err) throw err;
console.log('ZeroConf claim log updated!');