@web3modal/wallet
Advanced tools
Comparing version 4.0.0-alpha.3 to 4.0.0-bd5fd741
@@ -51,18 +51,20 @@ import { W3mFrameConstants } from './W3mFrameConstants.js'; | ||
}); | ||
const iframe = document.createElement('iframe'); | ||
iframe.id = 'w3m-iframe'; | ||
iframe.src = `${W3mFrameConstants.SECURE_SITE_SDK}?projectId=${projectId}`; | ||
iframe.style.position = 'fixed'; | ||
iframe.style.zIndex = '999999'; | ||
iframe.style.display = 'none'; | ||
iframe.style.opacity = '0'; | ||
iframe.style.borderRadius = `clamp(0px, var(--wui-border-radius-l), 44px)`; | ||
document.body.appendChild(iframe); | ||
this.iframe = iframe; | ||
this.iframe.onload = () => { | ||
this.frameLoadPromiseResolver?.resolve(undefined); | ||
}; | ||
this.iframe.onerror = () => { | ||
this.frameLoadPromiseResolver?.reject('Unable to load email login dependency'); | ||
}; | ||
if (typeof window !== 'undefined') { | ||
const iframe = document.createElement('iframe'); | ||
iframe.id = 'w3m-iframe'; | ||
iframe.src = `${W3mFrameConstants.SECURE_SITE_SDK}?projectId=${projectId}`; | ||
iframe.style.position = 'fixed'; | ||
iframe.style.zIndex = '999999'; | ||
iframe.style.display = 'none'; | ||
iframe.style.opacity = '0'; | ||
iframe.style.borderRadius = `clamp(0px, var(--wui-border-radius-l), 44px)`; | ||
document.body.appendChild(iframe); | ||
this.iframe = iframe; | ||
this.iframe.onload = () => { | ||
this.frameLoadPromiseResolver?.resolve(undefined); | ||
}; | ||
this.iframe.onerror = () => { | ||
this.frameLoadPromiseResolver?.reject('Unable to load email login dependency'); | ||
}; | ||
} | ||
} | ||
@@ -69,0 +71,0 @@ } |
export const W3mFrameConstants = { | ||
SECURE_SITE_SDK: 'https://secure.web3modal.com/sdk', | ||
SECURE_SITE_SDK: 'https://secure.walletconnect.com/sdk', | ||
APP_EVENT_KEY: '@w3m-app/', | ||
@@ -4,0 +4,0 @@ FRAME_EVENT_KEY: '@w3m-frame/', |
export declare const W3mFrameConstants: { | ||
readonly SECURE_SITE_SDK: "https://secure.web3modal.com/sdk"; | ||
readonly SECURE_SITE_SDK: "https://secure.walletconnect.com/sdk"; | ||
readonly APP_EVENT_KEY: "@w3m-app/"; | ||
@@ -4,0 +4,0 @@ readonly FRAME_EVENT_KEY: "@w3m-frame/"; |
{ | ||
"name": "@web3modal/wallet", | ||
"version": "4.0.0-alpha.3", | ||
"version": "4.0.0-bd5fd741", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "main": "./dist/esm/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
114318
2126