[bisq-network/bisq] User can set custom tx fee to override FeeService estimated fee (#4231)

cd2357 notifications at github.com
Sun May 3 23:33:56 UTC 2020

The user preferences already contained an option to set a custom withdrawal tx fee.

With this change, the scope of that field has been extended to cover all callers of the FeeService, which means every place where a tx fee is needed. If the preferences field is unset, the FeeService behavior falls back to the existing one (uses fee estimates from the earn.com API).

In summary, two things were done in this commit:
1. the FeeService logic was extended (if user set a custom fee, uses that instead of earn.com API estimate; otherwise queries fee API endpoint for estimations, as usual)
2. relevant fields, labels and methods have been renamed to reflect the change in scope (customWithdrawalTxFee -> customTxFee)

I tried to keep the change as non-invasive as possible. From what I can tell, the change is minimal (consisting mostly of renamed fields and methods).

The protobuf change is backward compatible with previously serialized user preference protobufs, because the "custom fee" fields already existed before. Its only the metadata for addressing the fields that has changed, which does not end up in the serialization. Only the field values are serialized, which remained the same.

Several local tests were successful:
- loading previously stored preferences (persisted before change, loaded after change)
- persisting preferences across Bisq restarts
- changing custom fee preference + navigating around UI + opening new trades

One known minor issue remains open, which is that of adjusting translations for other languages ("Withdrawal transaction fee" -> "Transaction fee"). Currently I have only changed the EN version.

Please let me know if you see any issues with the general direction or with the implementation.

Fixes / attempts to fix https://github.com/bisq-network/projects/issues/27
You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * User can override FeeService estimated fee via Preferences > Custom transaction fee

-- File Changes --

    M core/src/main/java/bisq/core/btc/wallet/BtcWalletService.java (10)
    M core/src/main/java/bisq/core/btc/wallet/WalletService.java (8)
    M core/src/main/java/bisq/core/provider/fee/FeeService.java (21)
    M core/src/main/java/bisq/core/user/Preferences.java (18)
    M core/src/main/java/bisq/core/user/PreferencesPayload.java (12)
    M core/src/main/resources/i18n/displayStrings.properties (2)
    M desktop/src/main/java/bisq/desktop/main/settings/preferences/PreferencesView.java (26)
    M proto/src/main/proto/pb.proto (4)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200503/5b94cb04/attachment.html>

More information about the bisq-github mailing list