Events
You can listen to specific events such as onTransactionSuccess
, onTransactionError
, onWidgetClose
and onWidgetOpen
FKEvents
The FKEvents
defines callback functions for various events that can occur during the operation of the widget. Here's a breakdown of each event:
Event | Type | Description |
---|---|---|
onTransactionSuccess |
| Called when a transaction is successful. |
onTransactionError |
| Called when a transaction encounters an error. |
onWidgetClose |
| Called when the widget is closed. |
onWidgetOpen |
| Called when the widget is opened. |
Event Data Types
TransactionSuccessData
Property | Type | Description |
---|---|---|
status | string | The status of the transaction. |
message | string | A message describing the transaction result. |
data | object | Additional data about the transaction. |
data.txHash | string | undefined | The transaction hash, if available. |
data[key: string] | string | number | undefined | Any additional key-value pairs. |
TransactionErrorData
Property | Type | Description |
---|---|---|
status | string | The status of the transaction (presumably an error status). |
message | string | A message describing the error. |
data | string | Additional data about the error. |
Example
Last updated