1
mirror of https://github.com/m2049r/xmrwallet synced 2025-09-23 07:10:51 +02:00

Compare commits

...

5 Commits

Author SHA1 Message Date
m2049r
a11c898e2c bump version 2020-03-09 07:17:46 +01:00
m2049r
9c921183ab catch NPE (#655) 2020-03-08 22:29:02 +01:00
m2049r
b978396a38 fix versionCode 2020-03-08 20:46:23 +01:00
m2049r
c6aa04e986 update heights & fix date parsing bug (#654) 2020-03-08 20:33:34 +01:00
m2049r
6c17b8bd87 update gradle 2020-02-29 10:43:13 +01:00
6 changed files with 21 additions and 13 deletions

View File

@@ -7,8 +7,8 @@ android {
applicationId "com.m2049r.xmrwallet" applicationId "com.m2049r.xmrwallet"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 28 targetSdkVersion 28
versionCode 201 versionCode 203
versionName "1.12.11 'Caerbannog'" versionName "1.12.13 'Caerbannog'"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild { externalNativeBuild {

View File

@@ -438,7 +438,7 @@ public class GenerateFragment extends Fragment {
height = RestoreHeight.getInstance().getHeight(parser.parse(restoreHeight)); height = RestoreHeight.getInstance().getHeight(parser.parse(restoreHeight));
} catch (ParseException ex) { } catch (ParseException ex) {
} }
if (height <= 0) if ((height <= 0) && (restoreHeight.length() == 8))
try { try {
// is it a date without dashes? // is it a date without dashes?
SimpleDateFormat parser = new SimpleDateFormat("yyyyMMdd"); SimpleDateFormat parser = new SimpleDateFormat("yyyyMMdd");

View File

@@ -109,6 +109,10 @@ public class RestoreHeight {
blockheight.put("2019-09-01", 1913201L); blockheight.put("2019-09-01", 1913201L);
blockheight.put("2019-10-01", 1934732L); blockheight.put("2019-10-01", 1934732L);
blockheight.put("2019-11-01", 1957051L); blockheight.put("2019-11-01", 1957051L);
blockheight.put("2019-12-01", 1978433L);
blockheight.put("2020-01-01", 2001315L);
blockheight.put("2020-02-01", 2023656L);
blockheight.put("2020-03-01", 2044552L);
} }
public long getHeight(String date) { public long getHeight(String date) {

View File

@@ -68,15 +68,19 @@ public class ExchangeEditText extends LinearLayout {
} }
boolean ok = true; boolean ok = true;
String nativeAmount = getNativeAmount(); String nativeAmount = getNativeAmount();
try { if (nativeAmount == null) {
double amount = Double.parseDouble(nativeAmount); ok = false;
if ((amount < min) || (amount > max)) { } else {
try {
double amount = Double.parseDouble(nativeAmount);
if ((amount < min) || (amount > max)) {
ok = false;
}
} catch (NumberFormatException ex) {
// this cannot be
Timber.e(ex.getLocalizedMessage());
ok = false; ok = false;
} }
} catch (NumberFormatException ex) {
// this cannot be
Timber.e(ex.getLocalizedMessage());
ok = false;
} }
if (!ok) { if (!ok) {
shakeAmountField(); shakeAmountField();

View File

@@ -6,7 +6,7 @@ buildscript {
google() google()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.5.2' classpath 'com.android.tools.build:gradle:3.6.1'
} }
} }

View File

@@ -1,6 +1,6 @@
#Sat Nov 09 21:47:30 CET 2019 #Sat Feb 29 10:39:20 CET 2020
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip