cannot compare doubles with == sainly, switch to checking if difference is less than 0.000001 instead
This commit is contained in:
parent
e18a740b20
commit
4ffc054bdd
1 changed files with 2 additions and 2 deletions
|
@ -634,8 +634,8 @@ public class ChannelCommentsFragment extends Fragment implements SdkStatusListen
|
||||||
showError(getString(R.string.please_enter_valid_deposit));
|
showError(getString(R.string.please_enter_valid_deposit));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (depositAmount == 0) {
|
if (depositAmount <= 0.000001) {
|
||||||
String error = getResources().getQuantityString(R.plurals.min_deposit_required, depositAmount == 1 ? 1 : 2, String.valueOf(Helper.MIN_DEPOSIT));
|
String error = getResources().getQuantityString(R.plurals.min_deposit_required, Math.abs(depositAmount-1.0) <= 0.000001 ? 1 : 2, String.valueOf(Helper.MIN_DEPOSIT));
|
||||||
showError(error);
|
showError(error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue