Skip to content

Displayed balance can exceed spendable balance (fractional-cent USD wallets) — manual full-balance sends fail at IBEX #690

Closed

Description

@islandbitcoin

Problem

The API reports USD cash-wallet balances in fractional cents (e.g. 109.9346 = $1.099346 held at IBEX). The app's balance header rounds for display, so the user sees $1.10 while only $1.099346 is spendable. Anyone who manually types their full displayed balance gets an IBEX rejection:

insufficient balance. Current Balance: 1.099346. Estimated Fee: 0.000000. invoice amount: 1.100000

Found while device-testing the MAX button (#512 / PR #689) — MAX itself now floors to whole minor units, but manual entry still hits this.

Options

  1. Display-floor: show the floored spendable balance ($1.09) everywhere a balance is displayed, so the user can never see a number they can't send.
  2. Clamp typed sends: when the entered amount exceeds spendable but is within a cent of it (i.e. the user clearly meant "everything"), clamp the send to the spendable max with a note.
  3. Both — floor the display and keep a clamp as a belt-and-braces guard.

Option 1 is the simpler and more honest fix; option 2 risks surprising users who typed a deliberate amount.

🤖 Generated with Claude Code

https://claude.ai/code/session_015fAxSGEsL2LsMx1uCjAzHH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions