[bisq-network/bisq] Prevent negative suggested mining fee when burning BSQ for fees (#5643)

jmacxx notifications at github.com
Fri Jul 30 04:46:44 CEST 2021


Problem: Negative mining fees could be shown in the make/take offer summary popup when BSQ is used for fees and the BTC sats value of the BSQ is greater than the calculated transaction fee.  

Using BSQ to pay trade fees burns the BSQ effectively paying miners with those sats.  A bug surfaced whereby negative mining fees could be displayed, giving a false/confusing impression to users.  Note that this is a display issue only, there were no problems with the trading transactions themselves.

After this fix, the displayed mining fee cannot be negative. 

![image](https://user-images.githubusercontent.com/47253594/127591622-c5285a1a-dba9-4d8c-8fd9-3105b073e329.png)

![Screenshot from 2021-07-29 21-34-53](https://user-images.githubusercontent.com/47253594/127591331-70e7580b-0048-4e48-8547-8b927f96a0b4.png)

In these examples the BSQ fee rate (Param.java) was artificially increased to 100 BSQ/BTC producing larger than usual BSQ fees and triggering the bug in order to validate the fix.

You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * prevent negative suggested mining fee when burning BSQ for fees

-- File Changes --

    M desktop/src/main/java/bisq/desktop/main/offer/MutableOfferDataModel.java (11)
    M desktop/src/main/java/bisq/desktop/main/offer/takeoffer/TakeOfferDataModel.java (11)

-- Patch Links --

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

-- 
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/5643
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20210729/ad14c8e9/attachment.htm>


More information about the bisq-github mailing list