Skip to content

Jon/fix/btcx max#419

Merged
Jon-edge merged 2 commits intomasterfrom
jon/fix/btcx-max
Nov 18, 2025
Merged

Jon/fix/btcx max#419
Jon-edge merged 2 commits intomasterfrom
jon/fix/btcx-max

Conversation

@Jon-edge
Copy link
Contributor

@Jon-edge Jon-edge commented Nov 17, 2025

Issue: MAX bridgeless (ZANO→BTC) failed because getMaxSwappable only resolved MAX for spendInfo-based flows. Bridgeless on Zano returns makeTx (no spendInfo), so the helper returned the original request, leaving quoteFor: 'max' and nativeAmount: '0'. The plugin then hit the min-amount check and threw SwapBelowLimit.

Solution: Updated getMaxSwappable to handle makeTx flows. For quoteFor: 'max', it now:

  1. Probes with a full-balance quoteFor: 'from' request.
  2. If no spendInfo (makeTx path), uses the wallet balance (minus any preTx parent fees when applicable) as the resolved MAX amount and returns a concrete from-quote request.

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Description

none

Note

Normalizes Bridgeless txid/order URI handling (auto 0x-prefix) and updates getMaxSwappable to work with makeTx paths without spendInfo.

  • Bridgeless (DEX):
    • Build orderId without forced 0x and, on approve, normalize txid to 0x-prefixed for orderId and orderUri.
    • Submit normalized txHash to autobot (PUT /api/bridgeless).
  • Swap helpers:
    • Update getMaxSwappable to handle quotes without spendInfo (makeTx paths), using full balance minus any preTx fees; retain getMaxSpendable path when spendInfo exists.
  • Changelog:
    • Add entries for the above fixes.

Written by Cursor Bugbot for commit d6519d3. This will update automatically on new commits. Configure here.


@Jon-edge Jon-edge merged commit 977069b into master Nov 18, 2025
2 checks passed
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.

2 participants