Skip to content

fix: only expose sats#17

Merged
rolznz merged 2 commits into
masterfrom
fix/only-expose-sats
Jun 25, 2025
Merged

fix: only expose sats#17
rolznz merged 2 commits into
masterfrom
fix/only-expose-sats

Conversation

@rolznz

@rolznz rolznz commented Jun 25, 2025

Copy link
Copy Markdown
Member

Fixes #16

This removes the confusion by the agent as it doesn't need to deal with different units.

This removes the confusion by the agent as it doesn't need to deal with different units.
@rolznz rolznz requested a review from bumi June 25, 2025 14:19
Comment thread src/tools/nwc/get_balance.ts Outdated

// Convert millisats to sats
const convertedBalance = {
balance: Math.ceil(balance.balance / 1000), // Round up when converting millisats to sats

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

hmm. isn't it better to round down in this case?
the millisats and the non-existent millisats I can not spend.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

True, for the balance. Other things like fees I think rounding up makes sense still?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Update: I only rounded up fees

Comment thread src/tools/nwc/get_balance.ts Outdated

// Convert millisats to sats
const convertedBalance = {
balance: Math.ceil(balance.balance / 1000), // Round up when converting millisats to sats

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

would it help some robot if the name of the property is more descriptive balance_in_sats ?

@rolznz rolznz merged commit d307bbb into master Jun 25, 2025
@rolznz rolznz deleted the fix/only-expose-sats branch June 25, 2025 15:28
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.

Only expose sats

2 participants