diff --git a/app/build.gradle b/app/build.gradle index 8d0a7475..629dd6c1 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -141,8 +141,6 @@ dependencies { implementation 'org.slf4j:slf4j-nop:1.7.30' implementation 'com.github.brnunes:swipeablerecyclerview:1.0.2' - implementation 'com.github.aelstad:keccakj:1.1.0' - testImplementation "junit:junit:$rootProject.ext.junitVersion" testImplementation "org.mockito:mockito-all:$rootProject.ext.mockitoVersion" testImplementation "com.squareup.okhttp3:mockwebserver:4.9.0" diff --git a/app/src/main/java/com/m2049r/xmrwallet/service/shift/sideshift/network/RequestQuoteImpl.java b/app/src/main/java/com/m2049r/xmrwallet/service/shift/sideshift/network/RequestQuoteImpl.java index c87465e6..1cbdf24c 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/service/shift/sideshift/network/RequestQuoteImpl.java +++ b/app/src/main/java/com/m2049r/xmrwallet/service/shift/sideshift/network/RequestQuoteImpl.java @@ -20,21 +20,21 @@ import androidx.annotation.NonNull; import com.m2049r.xmrwallet.service.shift.NetworkCallback; import com.m2049r.xmrwallet.service.shift.ShiftApiCall; -import com.m2049r.xmrwallet.util.DateHelper; -import com.m2049r.xmrwallet.service.shift.sideshift.api.RequestQuote; -import com.m2049r.xmrwallet.service.shift.sideshift.api.SideShiftApi; import com.m2049r.xmrwallet.service.shift.ShiftCallback; +import com.m2049r.xmrwallet.service.shift.sideshift.api.RequestQuote; +import com.m2049r.xmrwallet.util.DateHelper; import com.m2049r.xmrwallet.util.ServiceHelper; import org.json.JSONException; import org.json.JSONObject; import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; import java.text.ParseException; import java.util.Date; +import java.util.Locale; import lombok.Getter; -import timber.log.Timber; class RequestQuoteImpl implements RequestQuote { @Getter @@ -101,7 +101,7 @@ class RequestQuoteImpl implements RequestQuote { /** * Create JSON request object * - * @param xmrAmount how much XMR to shift to BTC + * @param btcAmount how much XMR to shift to BTC */ static JSONObject createRequest(final double btcAmount) throws JSONException { @@ -114,5 +114,13 @@ class RequestQuoteImpl implements RequestQuote { return jsonObject; } - static DecimalFormat AmountFormatter = new DecimalFormat("#.############"); + static final DecimalFormat AmountFormatter; + + static { + AmountFormatter = new DecimalFormat(); + AmountFormatter.setDecimalFormatSymbols(new DecimalFormatSymbols(Locale.US)); + AmountFormatter.setMinimumIntegerDigits(1); + AmountFormatter.setMaximumFractionDigits(12); + AmountFormatter.setGroupingUsed(false); + } } diff --git a/build.gradle b/build.gradle index 322ebf17..90d708d5 100644 --- a/build.gradle +++ b/build.gradle @@ -6,19 +6,13 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:7.0.2' + classpath 'com.android.tools.build:gradle:7.0.3' } } allprojects { repositories { mavenCentral() - maven { - url "https://maven.google.com" - } - maven { - url "https://repository.mulesoft.org/nexus/content/repositories/public/" - } google() } }