[bisq-network/bisq] Autoconfirm XMR trade if tx check was validated by proof service (#4421)

James Cox notifications at github.com
Sat Aug 22 17:25:39 UTC 2020


@jmacxx commented on this pull request.



> +                        if (confirmations < confirmsRequired)
+                            // we return TX_NOT_CONFIRMED which will cause a retry later
+                            return new XmrProofResult(confirmations, confirmsRequired, XmrProofResult.State.TX_NOT_CONFIRMED);
+                        else
+                            return new XmrProofResult(confirmations, confirmsRequired, XmrProofResult.State.PROOF_OK);
+                    }
+                }
+            }
+
+            // reaching this point means there was no matching amount
+            return new XmrProofResult(XmrProofResult.State.AMOUNT_NOT_MATCHING, null);
+
+            // TODO check if date of tx is after tradeDate (allow some tolerance to avoid clock sync issues).
+            //  Otherwise a scammer could send an old txKey from a prev trade with same amount before seller has
+            //  updated to new feature, thus the check for duplication would not detect the scam.
+            //  >>>>> the API does not provide date of tx <<<<<<

Incorporated trade date verification, I chose a tolerance window of 1 day.  https://github.com/bisq-network/bisq/pull/4421/commits/9a2e28cbb3abf6b0ba408f1c97c04845ea485ee5  Now the example trades won't auto-confirm since they are too old!  :wink:

![image](https://user-images.githubusercontent.com/47253594/90962013-6a5b6280-e472-11ea-8337-ee6497b8dc6e.png)


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/4421#discussion_r475111944
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200822/f08584c9/attachment.html>


More information about the bisq-github mailing list