Skip to content

API ReferenceReact provider and hooksFunction

getWalletFailureSettlement()

function getWalletFailureSettlement(operations?):
| {
operations: WalletOperation<AnvilWalletOperationType>[];
status: 'wallet-failed';
}
| undefined;

Beta

Returns the wallet-phase failure an already-finished operation snapshot carries, or undefined when the snapshot shows no failed operation.

Use this where the operation snapshot is all that is available — a form handed its terminal operations, for example. A snapshot whose operations are all still queued (which is how every pre-wallet stop leaves them) yields undefined: it carries no failure of its own, and reporting one would put a banner on a run that never reached the wallet.

It reports only Failed operations. A snapshot parked on an Indeterminate operation with no transactionHash also yields undefined; detect that case with isIndeterminateWithoutHash, or use toWorkflowSettlement, which returns wallet-indeterminate for it.

Parameters

ParameterType
operations?WalletOperation<AnvilWalletOperationType>[]

Returns

Type Literal

{
operations: WalletOperation < AnvilWalletOperationType > [];
status: 'wallet-failed';
}

operations

operations: WalletOperation < AnvilWalletOperationType > [];

status

status: 'wallet-failed';

A specific operation carries Failed and the failure detail.


undefined