Skip to content

Commit f62501e

Browse files
committed
fix: remove ww backdrop to avoid duplicate
1 parent fee0a1f commit f62501e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/connectors/webwallet/helpers/openWebwallet.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,16 @@ export const openWebwallet = async (
6060
const { allowedDapps } = await fetchAllowedDapps(network)
6161

6262
if (allowedDapps.includes(window.location.hostname)) {
63-
const modalId = "argent-webwallet-modal"
63+
const backdropId = "argent-webwallet-backdrop"
6464
const iframeId = "argent-webwallet-iframe"
6565

66-
const existingModal = document.getElementById(modalId)
66+
const existingBackdrop = document.getElementById(backdropId)
6767
const existingIframe = document.getElementById(iframeId)
6868

6969
// avoid duplicate iframes
70-
if (existingIframe && existingIframe && existingModal) {
70+
if (existingIframe && existingIframe && existingBackdrop) {
7171
existingIframe.remove()
72-
existingModal.remove()
72+
existingBackdrop.remove()
7373
}
7474
const { iframe, backdrop } = await createModal(origin, false)
7575

0 commit comments

Comments
 (0)