From b134c957f6b9a74203423d2da1e72e4089366e52 Mon Sep 17 00:00:00 2001 From: shreerang6921 <68148922+shreerang6921@users.noreply.github.com> Date: Thu, 28 Mar 2024 14:21:49 +0530 Subject: [PATCH] Fix add accounts method (#68) --- src/utils/accounts.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/accounts.ts b/src/utils/accounts.ts index aebbf8f..3d3213b 100644 --- a/src/utils/accounts.ts +++ b/src/utils/accounts.ts @@ -86,7 +86,9 @@ const addAccount = async (network: string): Promise => { try { const id = await getNextAccountId(network); const hdPath = getHDPath(network, `0'/0/${id}`); - return addAccountFromHDPath(hdPath); + const accounts = await addAccountFromHDPath(hdPath); + await updateAccountIndices(network, id); + return accounts; } catch (error) { console.error('Error creating account:', error); }