[bisq-network/bisq] Cleanup signed witness (#4744)

Christoph Atteneder notifications at github.com
Thu Nov 5 09:31:08 CET 2020


@ripcurlx commented on this pull request.



>  
-            log.debug("accountAgeCategory={}, limit={}, factor={}, accountAgeWitnessHash={}",
-                    accountAgeCategory,
-                    Coin.valueOf(limit).toFriendlyString(),
-                    factor,
-                    Utilities.bytesAsHexString(accountAgeWitness.getHash()));
-            return limit;
+        double factor;
+        boolean isRisky = PaymentMethod.hasChargebackRisk(paymentMethod, currencyCode);
+        if (!isRisky || direction == OfferPayload.Direction.SELL) {
+            // Get age of witness rather than time since signing for non risky payment methods and for selling
+            accountAgeCategory = getAccountAgeCategory(getAccountAge(accountAgeWitness, new Date()));
+        }
+        long limit = OfferRestrictions.TOLERATED_SMALL_TRADE_AMOUNT.value;
+        if (direction == OfferPayload.Direction.BUY && isRisky) {
+            // Used only for bying of BTC with risky payment methods

Nit: Just a little typo in the old code `buying` vs `bying`

-- 
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/4744#pullrequestreview-524022441
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20201105/e6c96351/attachment.html>


More information about the bisq-github mailing list