File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
app/src/main/java/io/scalaproject/vault Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -428,7 +428,7 @@ private boolean checkHeight() {
428428 long height = !type .equals (TYPE_NEW ) ? getHeight () : 0 ;
429429 boolean ok = true ;
430430 if (height < 0 ) {
431- if (etWalletRestoreHeight .getError ().toString ().isEmpty ())
431+ if (etWalletRestoreHeight .getError () == null || etWalletRestoreHeight . getError () .toString ().isEmpty ())
432432 etWalletRestoreHeight .setError (getString (R .string .generate_restoreheight_error ));
433433 ok = false ;
434434 }
@@ -454,7 +454,7 @@ private boolean checkHeightDate(final Date date) {
454454 }
455455
456456 private long getHeight () {
457- long height = 0 ;
457+ long height = - 1 ;
458458
459459 String restoreHeight = etWalletRestoreHeight .getEditText ().getText ().toString ().trim ();
460460
@@ -472,7 +472,7 @@ private long getHeight() {
472472 height = RestoreHeight .getInstance ().getHeight (date );
473473 } catch (ParseException ex ) {
474474 }
475- if ((height <= 0 ) && (restoreHeight .length () == 8 ))
475+ if ((height < 0 ) && (restoreHeight .length () == 8 ))
476476 try {
477477 // is it a date without dashes?
478478 SimpleDateFormat parser = new SimpleDateFormat ("yyyyMMdd" );
@@ -485,7 +485,7 @@ private long getHeight() {
485485 height = RestoreHeight .getInstance ().getHeight (date );
486486 } catch (ParseException ex ) {
487487 }
488- if (height <= 0 )
488+ if (height < 0 )
489489 try {
490490 // or is it a height?
491491 height = Long .parseLong (restoreHeight );
You can’t perform that action at this time.
0 commit comments