Skip to content

Fix #723: validate request-only offers require a network fee#744

Merged
Rigidity merged 1 commit into
xch-dev:mainfrom
joshpainter:fix/723-request-only-offer-validation
Feb 17, 2026
Merged

Fix #723: validate request-only offers require a network fee#744
Rigidity merged 1 commit into
xch-dev:mainfrom
joshpainter:fix/723-request-only-offer-validation

Conversation

@joshpainter

Copy link
Copy Markdown
Contributor

Summary

  • Creating an offer with only requested assets and zero fee crashes because there are no coins to spend
  • Added validation on both backend and frontend to catch this case with a clear error message

Changes

File Change
crates/sage/src/endpoints/offers.rs Backend guard: no offered assets + zero fee = clear error
src/pages/MakeOffer.tsx Frontend guard: same validation before opening confirmation dialog

Test plan

  • Create offer with only requested assets and zero fee → "A request-only offer requires a network fee"
  • Create offer with only requested assets and nonzero fee → proceeds normally
  • Create normal offer (both sides) with zero fee → proceeds normally
  • cargo clippy -p sage passes clean

🤖 Generated with Claude Code

Prevent crash when creating an offer with only requested assets and
zero fee by adding validation on both backend and frontend.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
joshpainter added a commit to joshpainter/sage that referenced this pull request Feb 12, 2026
Split batched PR xch-dev#740 into per-issue PRs:
- xch-dev#691 → PR xch-dev#741
- xch-dev#390 → PR xch-dev#742
- xch-dev#726 → PR xch-dev#743
- xch-dev#723 → PR xch-dev#744

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@Rigidity Rigidity merged commit 5051149 into xch-dev:main Feb 17, 2026
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