Skip to main content

Handling Mesh Events

Step 1: View your last Transfer Events

We've loaded in your last transfer attempt (success or failure), including every onEvent callback event type that triggered. To see full details of the event payload, please go ahead and click on any event types that have a down arrow expand option.

Click down arrow to expand and see Link event metadata.



onEvent callback:

In this step, we're going to look the Link SDK onEvent callback.

onEvent is callback function that is called when various events occur within the Mesh Link iframe. You can use the different Link event types to control your UI or update your systems.

Sending every event type to Mix Panel

 onEvent: (event) => {
if (event.type === 'close') {
console.log('Close event occurred in Mesh modal');
}


Mixpanel.track(event.type, {
txnId: linkToken.transferOptions.transactionId,
userId: linkToken.UserId,
amountInFiat: linkToken.transferOptions.amountInFiat,
symbol: linkToken.transferOptions.toAddresses[0].symbol,
networkId: linkToken.transferOptions.toAddresses[0].networkId
});

Please see our guide for all callbacks, event types and more.

Click next to fetch your Mesh Transfer details