useRepushUnconfirmedLimits
Requests another delivery attempt for limits that remain unconfirmed.
When to use it
This mutation takes no payload; call it from an explicit recovery action.
Setup
Call it from a client-side React component below OvokProvider so it uses the client configured at that provider boundary.
Hook arguments
The hook takes no configuration arguments. Call mutate(undefined) when the user or workflow is ready to run the operation; it does not run during render.
TypeScript signature
(): OvokMutationState<void, RepushUnconfirmedLimitsResult>
Mutation state
The operation runs only when you call mutate(undefined). Its input type is void; the returned promise and data carry RepushUnconfirmedLimitsResult.
| Field | Meaning |
|---|---|
data | Latest successful result, or undefined before success. |
loading | Whether the mutation is running. |
error | Normalized Error from the latest failure. |
mutate | Starts the operation, resolves with its result, and rejects on failure. |
reset | Clears mutation data and error state. |
Request behavior
The mutation is explicit: call mutate(undefined) from a user action, disable repeated submission while loading is true, handle the rejected promise, and render error near the action.
Example
Call the mutation from an event handler and show its error beside the action.
import { useRepushUnconfirmedLimits } from '@ovok/core';
export function RepushButton() {
const { mutate, loading, error } = useRepushUnconfirmedLimits();
async function repush() {
try { await mutate(undefined); } catch { /* The hook exposes the error below. */ }
}
return <><button disabled={loading} onClick={() => void repush()}>Retry delivery</button>
{error && <p role="alert">{error.message}</p>}</>;
}
Related
- Generated API reference for overloads and exact input and response types.
- React applications for provider setup and application patterns.
- Hook guide index for related hooks.