forked from cerc-io/laconic-wallet
Fix add accounts method (#68)
This commit is contained in:
parent
cc3d7f708f
commit
b134c957f6
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user