Updated on 2026-08-14

This commit is contained in:
Tangem 2018-09-04 13:21:07 +03:00
parent 8afcc6fbdf
commit 608753d937
10 changed files with 100 additions and 83 deletions

View file

@ -333,12 +333,12 @@ public class BtcEngine extends CoinEngine {
}
public boolean checkAmountValue(TangemCard mCard, String amountValue, String feeValue, Long minFeeInInternalUnits) {
Long fee = null;
Long amount = null;
public boolean checkAmountValue(TangemCard card, String amountValue, String feeValue, Long minFeeInInternalUnits) {
Long fee;
Long amount;
try {
amount = mCard.InternalUnitsFromString(amountValue);
fee = mCard.InternalUnitsFromString(feeValue);
amount = card.internalUnitsFromString(amountValue);
fee = card.internalUnitsFromString(feeValue);
} catch (Exception e) {
e.printStackTrace();
return false;
@ -445,7 +445,7 @@ public class BtcEngine extends CoinEngine {
@Override
public byte[] convertAmountToByteArray(TangemCard mCard, String amount) throws Exception {
byte[] bytes = Util.longToByteArray(mCard.InternalUnitsFromString(amount));
byte[] bytes = Util.longToByteArray(mCard.internalUnitsFromString(amount));
byte[] reversed = new byte[bytes.length];
for (int i = 0; i < bytes.length; i++) reversed[i] = bytes[bytes.length - i - 1];
return reversed;