From 03a93801619deaa5920df637a8d4d4a3a45d1dac Mon Sep 17 00:00:00 2001 From: Jhonatan Gonzalez Date: Mon, 5 Aug 2024 14:26:17 +1000 Subject: [PATCH] [NO CHANGELOG][Checkout Widget] Add EIP_6369 post message event type (#2058) --- .../sdk/src/postMessageHandler/postMessageHandler.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/checkout/sdk/src/postMessageHandler/postMessageHandler.ts b/packages/checkout/sdk/src/postMessageHandler/postMessageHandler.ts index 148efe6c1c..0142aa6509 100644 --- a/packages/checkout/sdk/src/postMessageHandler/postMessageHandler.ts +++ b/packages/checkout/sdk/src/postMessageHandler/postMessageHandler.ts @@ -6,12 +6,21 @@ export type PostMessageHandlerConfiguration = { // todo put these in a types file export enum PostMessageHandlerEventType { PROVIDER_RELAY = 'IMTBL_PROVIDER_RELAY', + EIP_6963_EVENT = 'IMTBL_EIP_6963_EVENT', WIDGET_EVENT = 'IMTBL_CHECKOUT_WIDGET_EVENT', } +export type PostMessageProviderRelayData = any; + +export type PostMessageEIP6963Data = any; + +export type PostMessagePayaload = + | PostMessageProviderRelayData + | PostMessageEIP6963Data; + export type PostMessageData = { type: PostMessageHandlerEventType; - payload: any; + payload: PostMessagePayaload; }; export interface MinimalEventSourceInterface {