Register a callback with Relay.on() to listen for ChainPatrol warning-page events like ContinueAtOwnRisk inside your browser extension background script.
Example
import { Relay, Events } from "@chainpatrol/sdk";Relay.on(Events.ContinueAtOwnRisk, (request) => { // Handle the event});
Parameters
The on() method accepts two parameters:
EventType
required
The type property specifies what type of event you want to listen for.
(data: EventData) => void
required
The callback property is a function that will be called when the event is
triggered. The event data is passed to the callback function as the first
parameter.