Skip to content

Commit 4b2f0cc

Browse files
committed
tx scanning
1 parent 60cadc9 commit 4b2f0cc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

assets_js_bitrequest_fetchblocks.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ function blockcypher_fetch(rd, api_data, rdo) {
678678
$.each(sortlist, function(dat, value) {
679679
if (!value.spent) { // filter outgoing transactions
680680
const txd = blockcypher_scan_data(value, rdo.setconfirmations, rd.currencysymbol, rd.payment);
681-
if (txd.transactiontime > rdo.request_timestamp && txd.ccval) {
681+
if (txd.ccval && txd.transactiontime > rdo.request_timestamp) {
682682
txdat = txd;
683683
if (rdo.source === "requests") {
684684
const tx_listitem = append_tx_li(txd, rd.requesttype);
@@ -1233,7 +1233,7 @@ function blockchair_fetch(rd, api_data, rdo) {
12331233
}
12341234
}
12351235
});
1236-
scan_match(rd, api_data, rdo, counter);
1236+
scan_match(rd, api_data, rdo, counter, txdat);
12371237
return
12381238
}
12391239
tx_api_scan_fail(null, rd, api_data, rdo);

assets_js_bitrequest_polling.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ function tx_polling(tx_data, api_dat, retry) {
3636
if (request) {
3737
const txhash = tx_data.txhash;
3838
if (txhash) {
39-
confirmations(tx_data, true);
4039
if (!tx_data.setconfirmations) {
40+
confirmations(tx_data, true);
4141
return
4242
}
4343
const eth_layer2 = tx_data.eth_layer2;
@@ -324,13 +324,13 @@ function confirmations(tx_data, direct, ln) {
324324
conf_text = setconfirmations ? setconfirmations.toString() : "",
325325
confbox = brstatuspanel.find("span.confbox"),
326326
confboxspan = confbox.find("span"),
327-
currentconf = parseFloat(confboxspan.attr("data-conf")),
327+
data_conf = parseFloat(confboxspan.attr("data-conf")),
328+
currentconf = Number.isNaN(data_conf) ? 0 : data_conf,
328329
xconf = tx_data.confirmations || 0,
329330
zero_conf = setconfirmations === false || tx_data.instant_lock; // Dashpay instant_lock
330331

331332
brstatuspanel.find("span#confnumber").text(conf_text);
332333
new_status = xconf;
333-
334334
if (xconf > currentconf || zero_conf === true || direct === true) {
335335
reset_recent();
336336
br_remove_session("txstatus"); // remove cached historical exchange rates

0 commit comments

Comments
 (0)