Skip to content

feat: added balance ₿-only format(bip177) #299

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 17, 2025

Conversation

r1b2ns
Copy link
Collaborator

@r1b2ns r1b2ns commented Jul 11, 2025

Description

This PR added ₿-only format on balance screen view and resolve the issue

Reference
https://bitcoin.design/guide/designing-products/units-and-symbols/#sample-mockups

Screens

Simulator Screenshot - iPhone 15 Pro - 2025-07-11 at 13 02 18 Simulator Screenshot - iPhone 15 Pro - 2025-07-11 at 13 15 17 Simulator Screenshot - iPhone 15 Pro - 2025-07-11 at 13 15 45

Checklists

All Submissions:

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature
  • UI changes tested on small, medium, and large devices to ensure layout consistency

@r1b2ns r1b2ns added the enhancement New feature or request label Jul 11, 2025
@r1b2ns r1b2ns self-assigned this Jul 11, 2025
@r1b2ns r1b2ns marked this pull request as ready for review July 11, 2025 16:32
@r1b2ns r1b2ns requested a review from reez July 11, 2025 16:32
@reez
Copy link
Collaborator

reez commented Jul 11, 2025

looking pretty good so far.

The implementation uses "1K", "1M" notation which differs from BIP177's actual proposal. BIP177 suggests displaying sats as integers with thousand separators (e.g., "₿10,000" not "10K").

@r1b2ns
Copy link
Collaborator Author

r1b2ns commented Jul 13, 2025

Nice, @reez. I was following these samples to create the 1k and 1M notation logic.

'''
Examples #
Examples of how legacy bitcoin quantities would be represented under this new convention:

0.00000100 BTC -> ₿100
0.00005449 BTC -> ₿5,449
3.25 BTC -> ₿325,000,000 or ₿325M
15,000 sats -> ₿15,000 or ₿15K
'''

I little confused, Wouldn’t we use this notation?

@reez
Copy link
Collaborator

reez commented Jul 14, 2025

ACK 6fdb931

This is perfect actually.

My b, you're totally right, I was getting tripped up on 15,000 sats -> ₿15,000 **or** ₿15K part, but I see you have it implemented nicely handling this where ₿15K when representing 15,000 sats and then shows ₿15,123 when representing 15,123 sats

I'll merge this (and any other open PRs) after I merge #302 (later this week hopefully when bdk-ffi/swift 2.0 is released).

@r1b2ns
Copy link
Collaborator Author

r1b2ns commented Jul 14, 2025

Awesome, @reez i'll implement it on Monday app too

@reez
Copy link
Collaborator

reez commented Jul 14, 2025

Awesome, @reez i'll implement it on Monday app too

great! I'll merge that one as soon as I see it

@reez reez merged commit 6dd3156 into bitcoindevkit:main Jul 17, 2025
1 check passed
@r1b2ns r1b2ns deleted the feat/ui-bip-177 branch July 18, 2025 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants