'Capturing requests from web3 wallet connect from iFrame in parent window

Am looking to create an onboard process for Solana NFTs. Want to embed dapps in the site to create a hands on user experience as they go through content.

So for example user watches video, then scrolls down and connects directly to MagicEden.

I am using iframes to accomplish this ux.

the problem. I cannot receive the connect request from the child iframe (magiceden) in the parent(my app) . I see the web3 object is getting passed through to iframe (because the magic eden ui says wallet detected) but upon trynna connect it just hangs.

Any idea on how to accomplish this? Am I [stupid] for trying to use iframes in this way?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source