[bisq-network/bisq] Add tx fee rate api methods: gettxfeerate, settxfeerate, unsettxfeerate (#4858)

sqrrm notifications at github.com
Tue Dec 1 22:12:33 CET 2020


@sqrrm 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)

Agreed, not an issue for now, good to think of how to handle it though as you say.

-- 
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_r533724234
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20201201/5523c513/attachment-0001.htm>


More information about the bisq-github mailing list