You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(server): revoke stale fee grant so re-paying agents can provision
MsgGrantAllowance hard-fails when the grantee already holds a fee grant,
and atomicity takes MsgShareSubscription down with it - any agent that
bought a plan before could never buy again. Observed live 2026-06-12:
HTTP 500 PROVISIONING_FAILED "fee allowance already exists ... message
index: 1" on every repeat purchase (charged:false, so no funds lost).
provisionAgent now broadcasts through broadcastProvision(): try
[share, grant] as before; if the failure log contains "fee allowance
already exists", retry once with [share, revoke, grant] in a single
atomic TX. The replacement grant carries the new purchase's spend limit
and expiry. Fresh agents never pay the extra round-trip.
Verified on sentinelhub-2 (sequential, 7s gaps):
- duplicate MsgGrantAllowance rejects with the exact matched string
(thrown error path), TX 4CFA4FC2...
- atomic [MsgRevokeAllowance, MsgGrantAllowance] succeeds,
TX 280562E1... (test grant revoked after, TX 8085F9AC...)
0 commit comments