Skip to main content

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.

FieldMeaning
dataLatest successful result, or undefined before success.
loadingWhether the mutation is running.
errorNormalized Error from the latest failure.
mutateStarts the operation, resolves with its result, and rejects on failure.
resetClears 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>}</>;
}