[bisq-network/bisq] Refactor desktop's BsqSendView 'sendbsq', share with api (#4801)

Stan notifications at github.com
Wed Dec 2 18:58:30 CET 2020


@ghubstan commented on this pull request.



> @@ -354,7 +352,7 @@ private LegacyAddress getValidBsqLegacyAddress(String address) {
 
     // Returns a Coin for the double amount, or a RuntimeException if invalid.
     private Coin getValidBsqTransferAmount(double amount) {
-        Coin amountAsCoin = parseToCoin(new BigDecimal(amount).toString(), bsqFormatter);
+        Coin amountAsCoin = parseToCoin(Double.toString(amount), bsqFormatter);

After much discussion on keybase, changed amount type to String in commit 65df9e1503a9a38518ac29544e8a62cd4ff1045a.

A user needs to be able to enter a representation of a decimal value like "0.25" instead of a satoshi value like 25000000.
The server will convert the string to a Coin for use in a transaction.

-- 
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/4801#discussion_r534369808
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20201202/a519fa59/attachment.htm>


More information about the bisq-github mailing list