[bisq-network/bisq-core] Improve text (#158)

chirhonul notifications at github.com
Tue Aug 21 09:40:22 UTC 2018


chirhonul commented on this pull request.



> -        // Amount must result in a volume of min factor units of the fiat currency, e.g. 1 EUR or 10 EUR in case of Halcash
-        Volume volumeRoundedToFactor = Volume.parse(String.valueOf(factor), currencyCode);
-        Coin amountByVolumeRoundedToFactor = price.getAmountByVolume(volumeRoundedToFactor);
-        // We set min amount so it has a volume of 10 EUR
-        if (amount.compareTo(amountByVolumeRoundedToFactor) < 0)
-            amount = amountByVolumeRoundedToFactor;
+    /**
+     *
+     * @param amount            Bitcoin amount which is a candidate for getting rounded
+     * @param price             Price used in relation ot that amount
+     * @param maxTradeLimit     The max. trade limit of the users account.
+     * @param factor            The factor used for rounding. E.g. 1 means rounded to units of 1 EUR, 10 means rounded to 10 EUR...
+     * @return The adjusted amount
+     */
+    @VisibleForTesting
+    static Coin getAdjustedAmount(Coin amount, Price price, long maxTradeLimit, int factor) {

For future reference, those tests I mentioned above were merged in #160.

-- 
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-core/pull/158#discussion_r211542564
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20180821/efe5df7a/attachment.html>


More information about the bisq-github mailing list