@@ -424,7 +424,7 @@ function tx_api_scan_fail(rd, api_data, rdo, error_data, all_proxys, l2) {
424
424
tx_api_fail ( thislist , rdo . statuspanel ) ;
425
425
}
426
426
}
427
- if ( src === "addr_polling" && rdo . socket === true ) {
427
+ if ( src === "addr_polling" && rdo . socket ) {
428
428
handle_socket_fails ( api_data , rd . address ) ;
429
429
return
430
430
}
@@ -607,8 +607,7 @@ function get_api_error_data(error) {
607
607
608
608
// Sets the API source for a given request
609
609
function set_api_src ( rdo , api_data ) {
610
- const src = rdo . source ;
611
- if ( src === "list" ) {
610
+ if ( rdo . source === "list" ) {
612
611
api_src ( rdo . thislist , api_data ) ;
613
612
}
614
613
}
@@ -846,40 +845,35 @@ function get_next_rpc(this_payment, api_data, requestid) {
846
845
847
846
// Appends a transaction list item with given transaction data
848
847
function append_tx_li ( txd , rqtype ) {
849
- const txhash = txd . txhash ,
848
+ const txhash = txd . txhash ;
849
+ if ( ! txhash ) return null ;
850
+ const ccval = txd . ccval ,
851
+ ccval_rounded = trimdecimals ( ccval , 6 ) ,
852
+ transactiontime = txd . transactiontime ,
853
+ conf = txd . confirmations ,
854
+ setconfirmations = txd . setconfirmations ,
855
+ ccsymbol = txd . ccsymbol ,
856
+ set_ccsymbol = ccsymbol ? ccsymbol . toUpperCase ( ) : "" ,
850
857
ln = txhash && txhash . slice ( 0 , 9 ) === "lightning" ;
851
- if ( txhash ) {
852
- const ccval = txd . ccval ,
853
- ccval_rounded = trimdecimals ( ccval , 6 ) ,
854
- transactiontime = txd . transactiontime ,
855
- conf = txd . confirmations ,
856
- setconfirmations = txd . setconfirmations ,
857
- ccsymbol = txd . ccsymbol ,
858
- set_ccsymbol = ccsymbol ? ccsymbol . toUpperCase ( ) : "" ,
859
- lnstr = ln ? " <span class='icon-power'></span>" : "" ,
860
- valstr = ( ln && ! conf ) ? "" : ccval_rounded + " " + set_ccsymbol + lnstr ,
861
- date_format = transactiontime ? short_date ( transactiontime ) : "" ,
862
- no_conf = setconfirmations === false ,
863
- instant_lock = txd . instant_lock ,
864
- confirmed = instant_lock || no_conf || ( conf && conf >= setconfirmations ) ,
865
- conf_count = no_conf ? "" : conf + " / " + setconfirmations + " " + translate ( "confirmations" ) ,
866
- instant_lock_text = instant_lock ? " (instant_lock)" : "" ,
867
- conf_title = instant_lock ? "instant_lock" : conf_count ,
868
- unconf_text = translate ( "unconfirmedtx" ) ,
869
- checked_span = "<span class='icon-checkmark' title='" + conf_title + "'></span>" ,
870
- confspan = confirmed ? checked_span : conf ? "<div class='txli_conf' title='" + conf_title + "'><div class='confbar'></div><span>" + conf_title + "</span></div>" :
871
- "<div class='txli_conf' title='" + unconf_text + "'><div class='confbar'></div><span>" + unconf_text + "</span></div>" ,
872
- tx_listitem = $ ( "<li><div class='txli_content'>" + date_format + confspan + "<div class='txli_conf txl_canceled'><span class='icon-blocked'></span>Canceled</div><span class='tx_val'> + " + valstr + " <span class='icon-eye show_tx' title='view on blockexplorer'></span></span></div></li>" ) ;
873
- if ( rqtype === false ) {
874
- return tx_listitem ;
875
- }
876
- if ( glob_tx_list . includes ( txhash ) ) { // check for indexed transaction id's
877
- return rqtype === "outgoing" ? null : tx_listitem ;
878
- }
879
- glob_tx_list . push ( txhash ) ;
880
- return tx_listitem ;
881
- }
882
- return null ;
858
+ lnstr = ln ? " <span class='icon-power'></span>" : "" ,
859
+ valstr = ( ln && ! conf ) ? "" : ccval_rounded + " " + set_ccsymbol + lnstr ,
860
+ date_format = transactiontime ? short_date ( transactiontime ) : "" ,
861
+ no_conf = setconfirmations === false ,
862
+ instant_lock = txd . instant_lock ,
863
+ confirmed = instant_lock || no_conf || ( conf && conf >= setconfirmations ) ,
864
+ conf_count = no_conf ? "" : conf + " / " + setconfirmations + " " + translate ( "confirmations" ) ,
865
+ instant_lock_text = instant_lock ? " (instant_lock)" : "" ,
866
+ conf_title = instant_lock ? "instant_lock" : conf_count ,
867
+ unconf_text = translate ( "unconfirmedtx" ) ,
868
+ checked_span = "<span class='icon-checkmark' title='" + conf_title + "'></span>" ,
869
+ confspan = confirmed ? checked_span : conf ? "<div class='txli_conf' title='" + conf_title + "'><div class='confbar'></div><span>" + conf_title + "</span></div>" :
870
+ "<div class='txli_conf' title='" + unconf_text + "'><div class='confbar'></div><span>" + unconf_text + "</span></div>" ,
871
+ tx_listitem = $ ( "<li><div class='txli_content'>" + date_format + confspan + "<div class='txli_conf txl_canceled'><span class='icon-blocked'></span>Canceled</div><span class='tx_val'> + " + valstr + " <span class='icon-eye show_tx' title='view on blockexplorer'></span></span></div></li>" ) ;
872
+ if ( glob_tx_list . includes ( txhash ) ) { // check for indexed transaction id's
873
+ return rqtype === "outgoing" ? null : tx_listitem ;
874
+ }
875
+ glob_tx_list . push ( txhash ) ;
876
+ return tx_listitem ;
883
877
}
884
878
885
879
// Creates HTML for historic data
0 commit comments