forked from cerc-io/cosmos-explorer
Fix Cointype for Secret
The cointype for Secret Network is 529 instead of 523.
This commit is contained in:
parent
38ab001a55
commit
6d5a0bfc33
@ -197,7 +197,7 @@ function getLedgerAppName(coinType) {
|
|||||||
switch (coinType) {
|
switch (coinType) {
|
||||||
case 60:
|
case 60:
|
||||||
return 'Ethereum'
|
return 'Ethereum'
|
||||||
case 523:
|
case 529:
|
||||||
return 'Secret'
|
return 'Secret'
|
||||||
case 852:
|
case 852:
|
||||||
return 'Desmos'
|
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()
|
const trans = transport === 'usb' ? await TransportWebUSB.create() : await TransportWebBLE.create()
|
||||||
// extract Cointype from from HDPath
|
// extract Cointype from from HDPath
|
||||||
const coinType = Number(stringToPath(hdPath)[1])
|
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 ledgerName = getLedgerAppName(coinType)
|
||||||
|
|
||||||
const signer = new LedgerSigner(trans, { hdPaths: [stringToPath(hdPath)], ledgerAppName: ledgerName })
|
const signer = new LedgerSigner(trans, { hdPaths: [stringToPath(hdPath)], ledgerAppName: ledgerName })
|
||||||
|
Loading…
Reference in New Issue
Block a user