Updated on 2026-08-14

This commit is contained in:
Tangem 2018-10-18 17:49:35 +03:00
parent 0856e3dcbc
commit e1999ed34f
8 changed files with 35 additions and 14 deletions

View file

@ -307,7 +307,7 @@ public class CardProtocol {
mNotifications.onReadAfterRequest();
}
} catch (IOException e) {
if (e.getMessage().contains("length exceeds supported maximum") && mIsoDep.isExtendedLengthApduSupported()) {
if (e.getMessage().contains("length")) {
throw new TangemException_ExtendedLengthNotSupported(e.getMessage());
}
throw e;

View file

@ -96,7 +96,7 @@ public class EthEngine extends CoinEngine {
BigDecimal d = convertToEth(dec);
String s = d.toString();
String pattern = "#0.000###############"; // If you like 4 zeros
String pattern = "#0.##################"; // If you like 4 zeros
DecimalFormat myFormatter = new DecimalFormat(pattern);
String output = myFormatter.format(d);
return output;

View file

@ -101,7 +101,7 @@ public class TokenEngine extends CoinEngine {
BigDecimal d = convertToEth(dec);
String s = d.toString();
String pattern = "#0.000###############"; // If you like 4 zeros
String pattern = "#0.##################"; // If you like 4 zeros
DecimalFormat myFormatter = new DecimalFormat(pattern);
String output = myFormatter.format(d);
return output;
@ -128,7 +128,7 @@ public class TokenEngine extends CoinEngine {
p = p.pow(getTokenDecimals(mCard));
BigDecimal l = d.divide(p);
String pattern = "#0.000###############"; // If you like 4 zeros
String pattern = "#0.##################"; // If you like 4 zeros
DecimalFormat myFormatter = new DecimalFormat(pattern);
String output = myFormatter.format(l);
return output;