Skip to content

fix: avoid recovering underfunded session channels#200

Open
arjunblj wants to merge 1 commit intowevm:mainfrom
arjunblj:fix/recover-only-funded-channels
Open

fix: avoid recovering underfunded session channels#200
arjunblj wants to merge 1 commit intowevm:mainfrom
arjunblj:fix/recover-only-funded-channels

Conversation

@arjunblj
Copy link

@arjunblj arjunblj commented Mar 18, 2026

Summary

  • only recover a suggested session channel when its remaining on-chain balance can cover the next payment
  • fall back to opening a new channel instead of issuing a voucher that server-side session validation must reject
  • add direct recovery coverage plus a session-level regression test for the fallback path

Test plan

  • pnpm check:ci
  • pnpm check:types
  • pnpm check:compat

Treat server-suggested session channel recovery as usable only when the
channel still has enough available on-chain balance for the next payment.
This keeps client recovery aligned with server-side session validation and
falls back to opening a new channel instead of issuing a voucher that the
server must reject.
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.

1 participant