From 3d874435c38f9b9af966969f314656e6ab2cdbcc Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Tue, 2 Jun 2020 08:57:12 +0100 Subject: [PATCH] change BigDecimal initialisation for comment cost --- .../io/lbry/browser/ui/channel/ChannelCommentsFragment.java | 2 +- .../java/io/lbry/browser/ui/findcontent/FileViewFragment.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/lbry/browser/ui/channel/ChannelCommentsFragment.java b/app/src/main/java/io/lbry/browser/ui/channel/ChannelCommentsFragment.java index fbb58190..2597b183 100644 --- a/app/src/main/java/io/lbry/browser/ui/channel/ChannelCommentsFragment.java +++ b/app/src/main/java/io/lbry/browser/ui/channel/ChannelCommentsFragment.java @@ -531,7 +531,7 @@ public class ChannelCommentsFragment extends Fragment implements SdkStatusListen Comment comment = buildPostComment(); // only use 2 decimal places - BigDecimal amount = new BigDecimal(new DecimalFormat(Helper.PLAIN_CURRENCY_FORMAT_PATTERN).format(tipAmount)); + BigDecimal amount = new BigDecimal(String.valueOf(tipAmount)); beforePostComment(); CommentCreateWithTipTask task = new CommentCreateWithTipTask(comment, amount, progressPostComment, new CommentCreateWithTipTask.CommentCreateWithTipHandler() { diff --git a/app/src/main/java/io/lbry/browser/ui/findcontent/FileViewFragment.java b/app/src/main/java/io/lbry/browser/ui/findcontent/FileViewFragment.java index 88dab58e..695fac83 100644 --- a/app/src/main/java/io/lbry/browser/ui/findcontent/FileViewFragment.java +++ b/app/src/main/java/io/lbry/browser/ui/findcontent/FileViewFragment.java @@ -2911,7 +2911,7 @@ public class FileViewFragment extends BaseFragment implements Comment comment = buildPostComment(); // only use 2 decimal places - BigDecimal amount = new BigDecimal(new DecimalFormat(Helper.PLAIN_CURRENCY_FORMAT_PATTERN).format(tipAmount)); + BigDecimal amount = new BigDecimal(String.valueOf(tipAmount)); beforePostComment(); CommentCreateWithTipTask task = new CommentCreateWithTipTask(comment, amount, progressPostComment, new CommentCreateWithTipTask.CommentCreateWithTipHandler() {