mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-21 22:31:44 +01:00
Fix verify task
This commit is contained in:
parent
8e0ec54fb1
commit
9df54372dc
3 changed files with 19 additions and 6 deletions
|
@ -18,6 +18,7 @@
|
|||
package bisq.core.offer;
|
||||
|
||||
import bisq.core.payment.payload.PaymentMethod;
|
||||
import bisq.core.trade.Trade;
|
||||
|
||||
import org.bitcoinj.core.Coin;
|
||||
|
||||
|
@ -37,6 +38,17 @@ public class OfferRestrictions {
|
|||
isMinTradeAmountRisky(offer);
|
||||
}
|
||||
|
||||
public static boolean isTradeRisky(Trade trade) {
|
||||
if (trade == null)
|
||||
return false;
|
||||
|
||||
Offer offer = trade.getOffer();
|
||||
return offer != null &&
|
||||
PaymentMethod.hasChargebackRisk(offer.getPaymentMethod()) &&
|
||||
trade.getTradeAmount() != null &&
|
||||
isAmountRisky(trade.getTradeAmount());
|
||||
}
|
||||
|
||||
public static boolean isMinTradeAmountRisky(Offer offer) {
|
||||
return isAmountRisky(offer.getMinAmount());
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
|
||||
package bisq.core.trade.protocol.tasks.seller;
|
||||
|
||||
import bisq.core.offer.Offer;
|
||||
import bisq.core.offer.OfferRestrictions;
|
||||
import bisq.core.payment.AccountAgeRestrictions;
|
||||
import bisq.core.trade.Trade;
|
||||
|
@ -40,11 +39,13 @@ public class SellerVerifiesPeersAccountAge extends TradeTask {
|
|||
try {
|
||||
runInterceptHook();
|
||||
|
||||
Offer offer = trade.getOffer();
|
||||
if (OfferRestrictions.isOfferRisky(offer) &&
|
||||
log.error("SellerVerifiesPeersAccountAge isOfferRisky={} isTradePeersAccountAgeImmature={}", OfferRestrictions.isTradeRisky(trade), AccountAgeRestrictions.isTradePeersAccountAgeImmature(processModel.getAccountAgeWitnessService(), trade));
|
||||
if (OfferRestrictions.isTradeRisky(trade) &&
|
||||
AccountAgeRestrictions.isTradePeersAccountAgeImmature(processModel.getAccountAgeWitnessService(), trade)) {
|
||||
failed("Trade process failed because the buyer's payment account was created after March 15th 2019 and the payment method is considered " +
|
||||
"risky regarding chargeback risk.");
|
||||
failed("Violation of security restrictions:\n" +
|
||||
" - The peer's account was created after March 15th 2019\n" +
|
||||
" - The trade amount is above 0.01 BTC\n" +
|
||||
" - The payment method for that offer is considered risky for bank chargebacks\n");
|
||||
} else {
|
||||
complete();
|
||||
}
|
||||
|
|
|
@ -491,7 +491,7 @@ takeOffer.failed.offererOffline=You cannot take that offer because the maker is
|
|||
takeOffer.warning.connectionToPeerLost=You lost connection to the maker.\nHe might have gone offline or has closed the connection to you because of too many open connections.\n\nIf you can still see his offer in the offerbook you can try to take the offer again.
|
||||
|
||||
takeOffer.error.noFundsLost=\n\nNo funds have left your wallet yet.\nPlease try to restart your application and check your network connection to see if you can resolve the issue.
|
||||
takeOffer.error.feePaid=\n\nThe taker fee is already paid. In the worst case you have lost that fee.\nPlease try to restart your application and check your network connection to see if you can resolve the issue.
|
||||
takeOffer.error.feePaid=\n\nPlease try to restart your application and check your network connection to see if you can resolve the issue.
|
||||
takeOffer.error.depositPublished=\n\nThe deposit transaction is already published.\nPlease try to restart your application and check your network connection to see if you can resolve the issue.\nIf the problem still remains please contact the developers for support.
|
||||
takeOffer.error.payoutPublished=\n\nThe payout transaction is already published.\nPlease try to restart your application and check your network connection to see if you can resolve the issue.\nIf the problem still remains please contact the developers for support.
|
||||
takeOffer.tac=With taking this offer I agree to the trade conditions as defined in this screen.
|
||||
|
|
Loading…
Add table
Reference in a new issue