diff --git a/src/components/WalletEmbed.tsx b/src/components/WalletEmbed.tsx index 038d4fe..f28542e 100644 --- a/src/components/WalletEmbed.tsx +++ b/src/components/WalletEmbed.tsx @@ -3,7 +3,7 @@ import React, { useEffect } from 'react' export const WalletEmbed = () => { useEffect(() => { const handleMessage = (event: MessageEvent) => { - if (event.origin !== 'http://localhost:3000') return; + // Not checking for event origin as only account addresses are returned if (event.data.type === 'REQUEST_WALLET_ACCOUNTS') { try { @@ -35,14 +35,14 @@ export const WalletEmbed = () => { type: 'WALLET_ACCOUNTS_DATA', data: addresses, }, - 'http://localhost:3000' + event.origin ); } catch (error) { (event.source as Window)?.postMessage({ type: 'ERROR', message: 'Error accessing wallet accounts data' - }, 'http://localhost:3000'); + }, event.origin); } } };