@@ -33,8 +33,9 @@ function route_transaction_monitor(tx_data, api_dat, retry) {
33
33
if ( request ) {
34
34
const tx_hash = tx_data . txhash ;
35
35
if ( tx_hash ) {
36
- if ( ! tx_data . setconfirmations ) {
37
- validate_confirmations ( tx_data , true ) ;
36
+ const zero_conf = ( tx_data . setconfirmations ) ? false : true ,
37
+ status = validate_confirmations ( tx_data , zero_conf ) ;
38
+ if ( status === "paid" ) {
38
39
return
39
40
}
40
41
const is_layer2 = tx_data . eth_layer2 ;
@@ -330,8 +331,7 @@ function validate_confirmations(tx_data, direct, ln) {
330
331
is_instant = required_confirms === false || tx_data . instant_lock ; // Dashpay instant_lock
331
332
332
333
status_panel . find ( "span#confnumber" ) . text ( confirm_text ) ;
333
- new_status = tx_confirms ;
334
- if ( tx_confirms > current_confirms || is_instant === true || direct === true ) {
334
+ if ( tx_confirms >= current_confirms || is_instant === true || direct === true ) {
335
335
clear_recent_requests ( ) ;
336
336
br_remove_session ( "txstatus" ) ; // remove cached historical exchange rates
337
337
confirm_box . removeClass ( "blob" ) ;
@@ -376,7 +376,6 @@ function validate_confirmations(tx_data, direct, ln) {
376
376
377
377
const exact_match = helper . exact ,
378
378
is_valid = crypto_symbol === "xmr" ? ( received_formatted > ( crypto_amount * 0.97 ) && received_formatted < ( crypto_amount * 1.03 ) ) : true ; // error margin for xmr integrated addresses
379
-
380
379
if ( is_valid ) {
381
380
const amount_valid = exact_match ? received_formatted === crypto_amount : received_formatted >= ( crypto_amount * 0.97 ) ;
382
381
if ( amount_valid ) {
0 commit comments