[bisq-network/bisq] Add tx fee rate api methods: gettxfeerate, settxfeerate, unsettxfeerate (#4858)
Stan
notifications at github.com
Tue Dec 1 18:38:44 CET 2020
@ghubstan commented on this pull request.
> + CompletableFuture<Void> feeRequestFuture = CompletableFuture.runAsync(feeService::requestFees);
+ feeRequestFuture.get(); // Block until async fee request is complete.
+ } catch (InterruptedException | ExecutionException e) {
+ throw new IllegalStateException("could not request fees from fee service.", e);
+ }
+
+ Coin stdTxFeeRate = feeService.getTxFeePerVbyte();
+ Coin customTxFeeRate = preferences.isUseCustomWithdrawalTxFee()
+ ? Coin.valueOf(preferences.getWithdrawalTxFeeInVbytes())
+ : Coin.NEGATIVE_SATOSHI;
+
+ return new TxFeeRateInfo(stdTxFeeRate.value, customTxFeeRate.value);
+ }
+
+ TxFeeRateInfo setTxFeeRatePreference(long txFeeRate) {
+ if (txFeeRate <= 0)
Doing this check here makes the CLI's error msg stylistically consistent with others.
This brings up a general issue that is going to need quite a bit of work in the API: displaying validation error messages coming from the server's core, in the CLI. But for now, getting all the v1 methods working for correct parameters is the short term priority.
--
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/4858#discussion_r533598664
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20201201/960f4cd9/attachment.htm>
More information about the bisq-github
mailing list