From 6d5a0bfc33dc9a140794839ec43c434546208b18 Mon Sep 17 00:00:00 2001 From: h3rt <94856309+SecretSaturn@users.noreply.github.com> Date: Tue, 3 May 2022 23:50:18 +0200 Subject: [PATCH] Fix Cointype for Secret The cointype for Secret Network is 529 instead of 523. --- src/libs/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/utils.js b/src/libs/utils.js index db040966..9c2b842f 100644 --- a/src/libs/utils.js +++ b/src/libs/utils.js @@ -197,7 +197,7 @@ function getLedgerAppName(coinType) { switch (coinType) { case 60: return 'Ethereum' - case 523: + case 529: return 'Secret' case 852: return 'Desmos' @@ -245,7 +245,7 @@ export async function getLedgerAddress(transport = 'blu', hdPath = "m/44'/118/0' const trans = transport === 'usb' ? await TransportWebUSB.create() : await TransportWebBLE.create() // extract Cointype from from HDPath const coinType = Number(stringToPath(hdPath)[1]) - // Check if Cointype is 529 for Secret Ledger App and use Cosmos Ledger App instead + const ledgerName = getLedgerAppName(coinType) const signer = new LedgerSigner(trans, { hdPaths: [stringToPath(hdPath)], ledgerAppName: ledgerName })