diff --git a/src/Payments/PreMountLoader.res b/src/Payments/PreMountLoader.res index 3b531e00b..79220b1d4 100644 --- a/src/Payments/PreMountLoader.res +++ b/src/Payments/PreMountLoader.res @@ -96,7 +96,6 @@ let make = (~sessionId, ~publishableKey, ~clientSecret, ~endpoint) => { if ( paymentMethodsResponseSent && customerPaymentMethodsResponseSent && sessionTokensResponseSent ) { - handlePostMessage([("preMountLoaderIframeUnMount", true->JSON.Encode.bool)]) Window.removeEventListener("message", handle) } None diff --git a/src/orca-loader/Elements.res b/src/orca-loader/Elements.res index 96ba341e2..095d1cd29 100644 --- a/src/orca-loader/Elements.res +++ b/src/orca-loader/Elements.res @@ -89,21 +89,12 @@ let make = ( let preMountLoaderIframeDiv = mountPreMountLoaderIframe() - let unMountPreMountLoaderIframe = () => { - switch preMountLoaderIframeDiv->Nullable.toOption { - | Some(iframe) => iframe->remove - | None => () - } - } - let preMountLoaderMountedPromise = Promise.make((resolve, _reject) => { let preMountLoaderIframeCallback = (ev: Types.event) => { let json = ev.data->Identity.anyTypeToJson let dict = json->Utils.getDictFromJson if dict->Dict.get("preMountLoaderIframeMountedCallback")->Option.isSome { resolve(true->JSON.Encode.bool) - } else if dict->Dict.get("preMountLoaderIframeUnMount")->Option.isSome { - unMountPreMountLoaderIframe() } } addSmartEventListener(