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

chirhonul notifications at github.com
Mon Aug 20 11:56:54 UTC 2018


chirhonul approved this pull request.

utACK 801086.

I left some comments with optional suggestions that you may want to review when you have the chance, but I think this is safe to go in with its current state.

> -        // 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) {

This method is fairly complex! It would be great if there were tests for it..

I have been working on that (and tests for some of the methods in `Coin`) which I will send out for review after this change goes in. I think I understand the behavior of the method, and that it's going to do what you want under normal conditions in terms of making user-provided values from the UI match the expected constraints.

> @@ -2155,7 +2156,7 @@ payment.f2f.info='Face to Face' trades have different rules and come with differ
   happened at the meeting. In such cases the BTC funds might get locked up forever or until the trading peers come to \
   an agreement.\n\n\
   To be sure you fully understand the differences with 'Face to Face' trades please read the instructions and \
-  recommendations at: 'https://docs.bisq.network/#f2f'
+  recommendations at: 'https://docs.bisq.network/trading-rules.html#f2f-trading'

(Optional) Maybe the URL could be removed from the property, since it's not being translated? Then we could append it to the translated property string in code.

-- 
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#pullrequestreview-147610576
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20180820/cf394f73/attachment.html>


More information about the bisq-github mailing list