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

James Cox notifications at github.com
Sun Aug 23 15:14:10 UTC 2020


@jmacxx commented on this pull request.



> +            String serviceAddress) {
+        this.txHash = txHash;
+        this.txKey = txKey;
+        this.recipientAddress = recipientAddress;
+        this.amount = amount;
+        this.confirmsRequired = confirmsRequired;
+        this.serviceAddress = serviceAddress;
+    }
+
+    // something to uniquely identify this object by
+    public String getKey() {
+        return txHash + "|" + serviceAddress;
+    }
+
+    public XmrProofResult checkApiResponse(String jsonTxt) {
+        try {

Thanks for the detailed review!  :pray: It'll probably take some time to address all the issues, I'll take care of the smaller nitpicks first and then focus on the few larger ones.

Regarding jsonTxt, its already logged as soon as its received by XmrProofRequester, here's an example:

    Aug-18 09:48:53.116 [XmrTransferProofRequest-bisq.core.trade.asset.xmr.XmrTransferProofRequester at 4aa8a732] INFO  b.c.t.a.x.XmrTransferProofRequester: HttpClient{socks5ProxyProvider=bisq.network.Socks5ProxyProvider at 19a0e182, baseUrl='http://78.47.61.90:8081', ignoreSocks5Proxy=false} 
    Aug-18 09:48:53.116 [XmrTransferProofRequest-bisq.core.trade.asset.xmr.XmrTransferProofRequester at 4aa8a732] INFO  b.c.t.a.x.XmrTransferProofRequester: /api/outputs?txhash=488e48ab0c7e69028d19f787ec57fd496ff114caba9ab265bfd41a3ea0e4687d&address=4ATyxmFGU7h3EWu5kYR6gy6iCNFCftbsjATfbuBBjsRHJM4KTwEyeiyVNNUmsfpK1kdRxs8QoPLsZanGqe1Mby43LeyWNMF&viewkey=6c336e52ed537676968ee319af6983c80b869ca6a732b5962c02748b486f8f0f&txprove=1 
    Aug-18 09:48:54.568 [XmrTransferProofRequest-bisq.core.trade.asset.xmr.XmrTransferProofRequester at 4aa8a732] INFO  b.c.t.a.x.XmrTransferProofRequester: {"data":{"address":"e957dac72bcec80d59b2fecacfa7522223b6a5df895b7e388e60297e85f3f867b42f43e8d9f086a99a997704ceb92bd9cd99d33952de90c9f5f93c82c62360ae","outputs":[{"amount":0,"match":false,"output_idx":0,"output_pubkey":"3136c340c7aa017175014a3756d91106395f8db970dd76039fa87bab63e8ccaa"},{"amount":100000000000,"match":true,"output_idx":1,"output_pubkey":"cffdc3ab0c0962e56cef363656be61db585c53cb1750a37e241ced16b4d50a26"}],"tx_confirmations":10437,"tx_hash":"488e48ab0c7e69028d19f787ec57fd496ff114caba9ab265bfd41a3ea0e4687d","tx_prove":true,"viewkey":"6c336e52ed537676968ee319af6983c80b869ca6a732b5962c02748b486f8f0f"},"status":"success"} 
    Aug-18 09:48:59.568 [XmrTransferProofRequest-bisq.core.trade.asset.xmr.XmrTransferProofRequester at 4aa8a732] INFO  b.c.t.a.x.XmrTransferProofRequester: confirmations: 10437, xmr txid: 488e48ab0c7e69028d19f787ec57fd496ff114caba9ab265bfd41a3ea0e4687d 
    Aug-18 09:48:59.574 [JavaFX Application Thread] INFO  b.c.t.TradeManager: Received a PROOF_OK message, remaining proofs needed: 0, tradeId 64667 
    Aug-18 09:48:59.574 [JavaFX Application Thread] INFO  b.c.t.TradeManager: Auto confirm was successful, transitioning trade 64667 to next step... 


-- 
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_r475231030
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200823/2bd6aa33/attachment.html>


More information about the bisq-github mailing list