Updated on 2026-08-14
This commit is contained in:
parent
e515f11668
commit
4e7d6a1816
2 changed files with 27 additions and 25 deletions
|
|
@ -15,7 +15,7 @@ android {
|
|||
applicationId "com.tangem.wallet"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 27
|
||||
versionCode 50
|
||||
versionCode 51
|
||||
versionName "0.87.1." + generateVersionName()
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -243,34 +243,36 @@ public class EthEngine extends CoinEngine {
|
|||
|
||||
|
||||
public boolean CheckAmountValie(TangemCard mCard, String amountValue, String feeValue, Long minFeeInInternalUnits) {
|
||||
Long fee = null;
|
||||
Long amount = null;
|
||||
// Long fee = null;
|
||||
// Long amount = null;
|
||||
// try {
|
||||
// amount = mCard.InternalUnitsFromString(amountValue);
|
||||
// fee = mCard.InternalUnitsFromString(feeValue);
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// if (fee == null || amount == null)
|
||||
// return false;
|
||||
//
|
||||
// if (fee == 0 || amount == 0)
|
||||
// return false;
|
||||
//
|
||||
//
|
||||
// if (fee < minFeeInInternalUnits)
|
||||
// return false;
|
||||
|
||||
try {
|
||||
amount = mCard.InternalUnitsFromString(amountValue);
|
||||
fee = mCard.InternalUnitsFromString(feeValue);
|
||||
} catch (Exception e) {
|
||||
BigDecimal tmpFee = new BigDecimal(feeValue);
|
||||
BigDecimal tmpAmount = new BigDecimal(amountValue);
|
||||
tmpAmount = tmpAmount.multiply(new BigDecimal("1000000000"));
|
||||
if (tmpFee.compareTo(tmpAmount) > 0)
|
||||
return false;
|
||||
} catch (NumberFormatException e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (fee == null || amount == null)
|
||||
return false;
|
||||
|
||||
if (fee == 0 || amount == 0)
|
||||
return false;
|
||||
|
||||
|
||||
if (fee < minFeeInInternalUnits)
|
||||
return false;
|
||||
|
||||
|
||||
BigDecimal tmpFee = new BigDecimal(feeValue);
|
||||
BigDecimal tmpAmount = new BigDecimal(amountValue);
|
||||
tmpAmount = tmpAmount.multiply(new BigDecimal("1000000000"));
|
||||
|
||||
if (tmpFee.compareTo(tmpAmount) > 0)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue