From 56a3c006cc992edcccba38f90b3cbd087d85053d Mon Sep 17 00:00:00 2001 From: hvarona Date: Sun, 25 Nov 2018 20:56:00 -0400 Subject: [PATCH] put version code --- app/build.gradle | 4 ++-- .../crystalwallet/apigenerator/InsightApiGenerator.java | 2 +- .../crystalwallet/apigenerator/insightapi/GetEstimateFee.java | 4 ++-- .../agorise/crystalwallet/manager/GeneralAccountManager.java | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 96c8483..4cffbf7 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -22,8 +22,8 @@ android { applicationId "cy.agorise.crystalwallet" minSdkVersion 21 targetSdkVersion 27 - versionCode 4 - versionName "0.4M.alpha" + versionCode 5 + versionName "0.5M.alpha" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" vectorDrawables { useSupportLibrary true diff --git a/app/src/main/java/cy/agorise/crystalwallet/apigenerator/InsightApiGenerator.java b/app/src/main/java/cy/agorise/crystalwallet/apigenerator/InsightApiGenerator.java index 8d5ab13..355dc6f 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/apigenerator/InsightApiGenerator.java +++ b/app/src/main/java/cy/agorise/crystalwallet/apigenerator/InsightApiGenerator.java @@ -75,7 +75,7 @@ public class InsightApiGenerator { GetEstimateFee.getEstimateFee(CryptoNetManager.getURL(cryptoCoin.getCryptoNet()), new GetEstimateFee.estimateFeeListener() { @Override - public void estimateFee(long value) { + public void estimateFee(double value) { request.listener.success(value,request.getId()); } diff --git a/app/src/main/java/cy/agorise/crystalwallet/apigenerator/insightapi/GetEstimateFee.java b/app/src/main/java/cy/agorise/crystalwallet/apigenerator/insightapi/GetEstimateFee.java index 9746530..e827d73 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/apigenerator/insightapi/GetEstimateFee.java +++ b/app/src/main/java/cy/agorise/crystalwallet/apigenerator/insightapi/GetEstimateFee.java @@ -35,7 +35,7 @@ public abstract class GetEstimateFee { call.enqueue(new Callback() { @Override public void onResponse(Call call, Response response) { - listener.estimateFee((long) (response.body().get("2").getAsDouble())); + listener.estimateFee((double) (response.body().get("2").getAsDouble())); } @@ -52,7 +52,7 @@ public abstract class GetEstimateFee { } public static interface estimateFeeListener{ - public void estimateFee(long value); + public void estimateFee(double value); public void fail(); } diff --git a/app/src/main/java/cy/agorise/crystalwallet/manager/GeneralAccountManager.java b/app/src/main/java/cy/agorise/crystalwallet/manager/GeneralAccountManager.java index b802316..42caaf7 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/manager/GeneralAccountManager.java +++ b/app/src/main/java/cy/agorise/crystalwallet/manager/GeneralAccountManager.java @@ -380,7 +380,7 @@ public class GeneralAccountManager implements CryptoAccountManager, CryptoNetInf Transaction tx = new Transaction(cryptoCoin.getParameters()); long currentAmount = 0; long fee = -1; - long feeRate = (Long) answer; + long feeRate = (long)(((double)answer) * Math.pow(10,cryptoCoin.getPrecision())); fee = 226 * feeRate; CrystalDatabase db = CrystalDatabase.getAppDatabase(request.getContext());