Skip to content

Conversation

@rolznz
Copy link
Collaborator

@rolznz rolznz commented Jun 25, 2025

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

// Convert millisats to sats
const convertedBalance = {
balance: Math.ceil(balance.balance / 1000), // Round up when converting millisats to sats
Copy link
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
Collaborator 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
Collaborator 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


// Convert millisats to sats
const convertedBalance = {
balance: Math.ceil(balance.balance / 1000), // Round up when converting millisats to sats
Copy link
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

3 participants