Fix add accounts method (#68)

This commit is contained in:
shreerang6921 2024-03-28 14:21:49 +05:30 committed by GitHub
parent cc3d7f708f
commit b134c957f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -86,7 +86,9 @@ const addAccount = async (network: string): Promise<Account | undefined> => {
try { try {
const id = await getNextAccountId(network); const id = await getNextAccountId(network);
const hdPath = getHDPath(network, `0'/0/${id}`); const hdPath = getHDPath(network, `0'/0/${id}`);
return addAccountFromHDPath(hdPath); const accounts = await addAccountFromHDPath(hdPath);
await updateAccountIndices(network, id);
return accounts;
} catch (error) { } catch (error) {
console.error('Error creating account:', error); console.error('Error creating account:', error);
} }