Compare commits
4 Commits
main
...
ng-debug-a
| Author | SHA1 | Date | |
|---|---|---|---|
| 1f9842f1d5 | |||
| 5c0162fcb4 | |||
| 24bae4d811 | |||
| 86b9e379c9 |
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "web-wallet",
|
||||
"version": "0.1.2",
|
||||
"version": "0.1.3",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@cerc-io/registry-sdk": "^0.2.5",
|
||||
|
||||
@ -23,7 +23,11 @@ const useGetOrCreateAccounts = () => {
|
||||
accountsData = await getAccountsData(event.data.chainId);
|
||||
}
|
||||
|
||||
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', handleCreateAccounts);
|
||||
@ -31,7 +35,7 @@ const useGetOrCreateAccounts = () => {
|
||||
return () => {
|
||||
window.removeEventListener('message', handleCreateAccounts);
|
||||
};
|
||||
}, [networksData, getAccountsData ]);
|
||||
}, [networksData, getAccountsData]);
|
||||
};
|
||||
|
||||
export default useGetOrCreateAccounts;
|
||||
|
||||
@ -88,6 +88,7 @@ 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.');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user