From 4f57796ffa6eb900a40d20544f11896b2bce8b9a Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 16 May 2018 13:38:28 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_transaction.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/iguana/exchanges/LP_transaction.c b/iguana/exchanges/LP_transaction.c index a5fb49bbf..96546ada7 100644 --- a/iguana/exchanges/LP_transaction.c +++ b/iguana/exchanges/LP_transaction.c @@ -1913,13 +1913,14 @@ char *LP_withdraw(struct iguana_info *coin,cJSON *argjson) char *LP_autosplit(struct iguana_info *coin) { - char *retstr; cJSON *argjson,*withdrawjson,*outputs,*item; int64_t total,balance,halfval; + char *retstr; cJSON *argjson,*withdrawjson,*outputs,*item; int64_t total,balance,halfval,txfee; if ( coin->etomic[0] == 0 ) { if ( coin->electrum != 0 ) balance = LP_unspents_load(coin->symbol,coin->smartaddr); else balance = LP_RTsmartbalance(coin); - printf("%s balance %.8f\n",coin->symbol,dstr(balance)); + if ( (txfee= coin->txfee) == 0 ) // BTC + txfee = LP_txfeecalc(coin,0,500); balance -= coin->txfee - 0.001; if ( balance > coin->txfee && balance >= 1000000 ) { @@ -1938,7 +1939,7 @@ char *LP_autosplit(struct iguana_info *coin) jadd(argjson,"outputs",outputs); jaddnum(argjson,"broadcast",strcmp(coin->symbol,"BTC") != 0); jaddstr(argjson,"coin",coin->symbol); - printf("halfval %.8f autosplit.(%s)\n",dstr(halfval),jprint(argjson,0)); + //printf("halfval %.8f autosplit.(%s)\n",dstr(halfval),jprint(argjson,0)); retstr = LP_withdraw(coin,argjson); free_json(argjson); return(retstr);