API ReferenceErrorsClass
WorkflowSignerChangedError
Error thrown when the account signing differs from the account an operation was prepared for: the
connected wallet changed after a workflow was built, or the SDK’s configured accountAddress and
the wallet’s account disagree. Rebuild the workflow for the account now connected, so balance,
allowance, signature, and transaction decisions all belong to one signer.
It extends WalletNotConnectedError, so code that catches that error also catches this one.
Extends
Constructors
Constructor
new WorkflowSignerChangedError(expectedAddress, actualAddress): WorkflowSignerChangedError;Parameters
| Parameter | Type | Description |
|---|---|---|
expectedAddress | `0x${string}` | The account the SDK expected to sign: the one the workflow or transaction was prepared for, or the configured accountAddress. |
actualAddress | `0x${string}` | The account the SDK found instead, usually the wallet’s current one. |
Returns
WorkflowSignerChangedError
Overrides
WalletNotConnectedError.constructor
Properties
actualAddress
readonly actualAddress: `0x${string}`;The account the SDK found instead, usually the wallet’s current one.
expectedAddress
readonly expectedAddress: `0x${string}`;The account the SDK expected to sign: the one the workflow or transaction was prepared for, or the
configured accountAddress.
Methods
walk()
walk<T>(errorType): T | undefined;Finds an error of the given class in this error’s cause chain. The search starts with this error
itself, then follows each cause in turn.
Type Parameters
| Type Parameter | Description |
|---|---|
T extends Error | The error class being searched for. |
Parameters
| Parameter | Type | Description |
|---|---|---|
errorType | (…args) => T | The error class to find, such as UserRejectedRequestError. |
Returns
T | undefined
The first error in the chain that is an instance of errorType, or undefined if there is none.
Example
const rejected = error.walk(UserRejectedRequestError);if (rejected) return; // the user declined in their wallet