Skip to content

Onchain sendAll payments are not accounting for fees #270

Open

Description

@brh28

The OnChainPaymentSendAll mutation is failing because we're sending Ibex the entire wallet balance.

The best fix to this issue would be to have Ibex add a sendAll flag. I created another feature request with them: https://flash-qwj9494.slack.com/archives/C04K5NC9D3N/p1770220431805969

If they cannot support this, we should fetch the estimated fee and subtract from the wallet balance to get the proper amount. Note, if this fee differs from the fee used by Ibex, this may either fail or not sweep the entire balance.

Activity

  1. linear commented on Feb 4, 2026

    @linear
  2. changed the title [-]`` is not accounting for fees[/-] [+]Onchain `sendAll` payments are not accounting for fees[/+] on Feb 4, 2026
  3. added
    otherBug subgroup for uncategorized remaining issues
    and removed on Apr 17, 2026
  4. added
    bugSomething isn't working
    and removed on Oct 10, 2026
  5. islandbitcoin commented on Oct 10, 2026

    @islandbitcoin
    Contributor

    Priority pass 2026-10-10: rank 4 of 13. OnChainPaymentSendAll still passes the full balance to IBEX (onchain-payment-send-all.ts, send-on-chain.ts) and there is no sendAll flag in the IBEX client, so send-max on-chain fails outright. Fix: estimate fee, subtract, send with a tolerance.

  6. nul-quill commented on Oct 11, 2026

    @nul-quill

    Submitted in PR #521. New helper Wallets.getSendAllOnChainAmount asks IBEX for the on-chain fee for the payout address and sends balance - fee instead of the whole balance, so the sweep lands instead of being rejected for a fee charged on top. If the estimate is unavailable, empty, or covers the whole balance, it falls back to the previous full-balance behaviour. Covered by new unit tests (fee subtraction, fractional cents, all fallback branches) plus a resolver wiring test. jest: 47 suites / 519 tests pass. Handle: nul-quill. Payout wallets: Solana USDC BdznDjc4xwt5Y6WJT5UnrFQzDptka8YnC9oqmmkKpwkd, TRC20 TNEHCVwR2aPMrj5AKfWCQ2rFL3bEDQmsg7.

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

    HighbugSomething isn't workingotherBug subgroup for uncategorized remaining issues

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions