From 1bde70b7d62809fb5d796d4d66d79a6ad9581c8f Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Fri, 16 Feb 2024 09:40:33 +0530 Subject: [PATCH] HDPath display --- utils.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/utils.ts b/utils.ts index 82ef69a..b9a9f7c 100644 --- a/utils.ts +++ b/utils.ts @@ -22,8 +22,12 @@ const createWallet = async (): Promise => { await setInternetCredentials('mnemonicServer', 'mnemonic', mnemonic); const hdNode = HDNode.fromMnemonic(mnemonic); - const ethNode = hdNode.derivePath("m/44'/60'/0'/0/0"); - const cosmosNode = hdNode.derivePath("m/44'/118'/0'/0/0"); + + const ethDerivationPath = "m/44'/60'/0'/0/0"; + const cosmosDerivationPath = "m/44'/118'/0'/0/0"; + + const ethNode = hdNode.derivePath(ethDerivationPath); + const cosmosNode = hdNode.derivePath(cosmosDerivationPath); const ethAddress = ethNode.address; const cosmosAddress = (await getCosmosAccounts(mnemonic, 0)).data.address;