Skip to content

Commit

Permalink
Merge branch 'murisi/remove-redundant-decimal-points2' into v1.0.6-ci…
Browse files Browse the repository at this point in the history
…-patch
  • Loading branch information
murisi committed Dec 7, 2024
2 parents 51950e2 + f1bb8d5 commit 2eea9a5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/src/parser_print_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,12 @@ parser_error_t printAmount( const bytes_t *amount, bool isSigned, uint8_t amount
if (insertDecimalPoint(strAmount + isNegative, sizeof(strAmount) - isNegative, amountDenom) != zxerr_ok) {
return parser_unexpected_error;
}
//const char *suffix = (amountDenom == 0) ? ".0" : "";
z_str3join(strAmount, sizeof(strAmount), symbol, "");
number_inplace_trimming(strAmount, 1);
number_inplace_trimming(strAmount, 0);
const size_t len = strlen(strAmount);
if (len > 0 && strAmount[len-1] == '.') {
strAmount[len-1] = 0;
}
pageString(outVal, outValLen, strAmount, pageIdx, pageCount);

return parser_ok;
Expand Down

0 comments on commit 2eea9a5

Please sign in to comment.