Skip to main content

EventCallbacks

Table of contents

Methods

Methods

onApprove

Optional onApprove(tx): void | TxDoneCallback

Callback when an approval is being requested.

Parameters

NameType
txSocketTx

Returns

void | TxDoneCallback

Defined in

socket-v2-sdk/src/web3ConnectedSocket.ts:32


onChainSwitch

Optional onChainSwitch(fromChainId, toChainId): void | ChainSwitchDoneCallback

Callback when switching chains is being requested.

Parameters

NameType
fromChainIdChainId
toChainIdChainId

Returns

void | ChainSwitchDoneCallback

Defined in

socket-v2-sdk/src/web3ConnectedSocket.ts:36


onDone

Optional onDone(activerouteId): void

Callback when the route execution has completed.

Parameters

NameType
activerouteIdnumber

Returns

void

Defined in

socket-v2-sdk/src/web3ConnectedSocket.ts:38


onSend

Optional onSend(tx): void | TxDoneCallback

Callback when a send transaction is being requested.

Parameters

NameType
txSocketTx

Returns

void | TxDoneCallback

Defined in

socket-v2-sdk/src/web3ConnectedSocket.ts:34


onTx

Optional onTx(tx): void | SocketTxDoneCallback

Callback when a new socket transaction has begun.

Parameters

NameType
txSocketTx

Returns

void | SocketTxDoneCallback

Defined in

socket-v2-sdk/src/web3ConnectedSocket.ts:30