[bisq-network/bisq] Bugfix: corrupted MaxTradePeriod when offer payment method changed (PR #6176)

jmacxx notifications at github.com
Thu Apr 28 06:06:16 CEST 2022


Fixes #6174 

`maxTradeLimit` and `maxTradePeriod` were not being set in the `OfferPayload` when an offer was edited, instead they kept their values from the original offer.  So, for example, changing a Zelle offer to CashByMail would result in the trade period being displayed wrong (4 days when it should be 8).

_As a side note, I cannot find any reason for these two fields being in the offer payload at all.  Perhaps they are legacy and should be marked as deprecated?  Most of the code seems to just pick them from the payment method, there only seems to be this one spot in TradeStepView that uses maxTradePeriod from the offer._  ( -> fixed by https://github.com/bisq-network/bisq/commit/e0c13df89f5328779e2f71274568a04e67d7a557)
You can view, comment on, or merge this pull request online at:

  https://github.com/bisq-network/bisq/pull/6176

-- Commit Summary --

  * Set maxTradeLimit & maxTradePeriod appropriately when editing an offer.
  * Use maxTradePeriod from the PaymentMethod.

-- File Changes --

    M core/src/main/java/bisq/core/api/CoreOffersService.java (2)
    M core/src/main/java/bisq/core/offer/OfferUtil.java (4)
    M core/src/main/java/bisq/core/offer/bisq_v1/MutableOfferPayloadFields.java (10)
    M desktop/src/main/java/bisq/desktop/components/paymentmethods/PaymentMethodForm.java (2)

-- Patch Links --

https://github.com/bisq-network/bisq/pull/6176.patch
https://github.com/bisq-network/bisq/pull/6176.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/6176
You are receiving this because you are subscribed to this thread.

Message ID: <bisq-network/bisq/pull/6176 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20220427/c9831db3/attachment.htm>


More information about the bisq-github mailing list