Skip to content

Conversation

@OriginalEveres
Copy link
Contributor

@OriginalEveres OriginalEveres commented Oct 11, 2025

Changes:

  • fixed correct rounding for BTC fees
  • shows a correct decimal pad for BTC custom fee

Related Issue

Resolve #22400

Screenshots:

BEFORE:
499877285-4fa91cab-842f-4eb1-bd61-c1e6e8d93939
499877284-a1548086-6a48-42cc-9112-3e6b8807a468

AFTER:
simulator_screenshot_9CF399FF-173D-4F99-BDF4-0B8C90CE46DC
simulator_screenshot_0EFBE276-54AA-479E-AB9B-BB4B909D289A

🔍🖥️ Suite native android test results: View in Currents

@OriginalEveres OriginalEveres marked this pull request as ready for review October 11, 2025 12:38
@OriginalEveres OriginalEveres requested a review from a team as a code owner October 11, 2025 12:38
@OriginalEveres OriginalEveres marked this pull request as draft October 11, 2025 12:40
@OriginalEveres OriginalEveres marked this pull request as ready for review October 11, 2025 12:55
@Lemonexe Lemonexe self-requested a review October 13, 2025 13:31
Copy link
Contributor

@Lemonexe Lemonexe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Can't test because my local dev env is now broken 🙈
I'll take a look again when I can get it to work.

EDIT: works

return String(Math.round(Number(feeLevel.fee) / transactionBytes));
const feePerVb = Number(feeLevel.fee) / transactionBytes;

return Number.isInteger(Number(feePerVb)) ? String(feePerVb) : Number(feePerVb).toFixed(2);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feePerVb was alredy cast to number

Suggested change
return Number.isInteger(Number(feePerVb)) ? String(feePerVb) : Number(feePerVb).toFixed(2);
return Number.isInteger(feePerVb) ? String(feePerVb) : feePerVb.toFixed(2);

@OriginalEveres
Copy link
Contributor Author

/rebase

@github-actions
Copy link

@trezor-bot trezor-bot bot force-pushed the fix/native/btc-fees branch from 596f4fb to 2d2bbf2 Compare October 13, 2025 22:21
@OriginalEveres OriginalEveres merged commit 2452283 into develop Oct 14, 2025
20 checks passed
@OriginalEveres OriginalEveres deleted the fix/native/btc-fees branch October 14, 2025 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Buggy decimals in fee rate

2 participants