Compare commits

..
Author SHA1 Message Date
nabarun 3a0a321c6f Fix WALLET_ACCOUNTS_DATA iframe message data for Shopify app (#23)
Part of [Service provider auctions for web deployments](https://www.notion.so/Service-provider-auctions-for-web-deployments-104a6b22d47280dbad51d28aa3a91d75)

Reviewed-on: cerc-io/laconic-wallet-web#23
Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
Co-committed-by: Nabarun <nabarun@deepstacksoft.com>
2025-03-25 11:36:18 +00:00
+6 -2
View File
@@ -60,7 +60,12 @@ export const WalletEmbed = () => {
return;
}
sendMessage(event.source as Window, 'WALLET_ACCOUNTS_DATA', accountsData, event.origin);
sendMessage(
event.source as Window,
'WALLET_ACCOUNTS_DATA',
accountsData.map(account => account.address),
event.origin
);
};
window.addEventListener('message', handleGetAccounts);
@@ -88,7 +93,6 @@ export const WalletEmbed = () => {
throw new Error('Requested network not supported.');
}
console.log({ network, fromAddress, chainId, toAddress, amount });
const account = await retrieveSingleAccount(network.namespace, network.chainId, fromAddress);
if (!account) {
throw new Error('Account not found for the requested address.');