From 6613faee2d02188100807194ca273e32cf20e845 Mon Sep 17 00:00:00 2001 From: Svarog Date: Thu, 20 May 2021 17:43:07 +0300 Subject: [PATCH] Invert coin-type and purpose in default derivation path (#1728) --- cmd/kaspawallet/libkaspawallet/bip39.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/kaspawallet/libkaspawallet/bip39.go b/cmd/kaspawallet/libkaspawallet/bip39.go index a64667fa8..f3cac5e14 100644 --- a/cmd/kaspawallet/libkaspawallet/bip39.go +++ b/cmd/kaspawallet/libkaspawallet/bip39.go @@ -2,6 +2,7 @@ package libkaspawallet import ( "fmt" + "github.com/kaspanet/kaspad/cmd/kaspawallet/libkaspawallet/bip32" "github.com/kaspanet/kaspad/domain/dagconfig" "github.com/pkg/errors" @@ -31,7 +32,7 @@ func defaultPath(isMultisig bool) string { // TODO: Register the coin type in https://github.com/satoshilabs/slips/blob/master/slip-0044.md const coinType = 111111 - return fmt.Sprintf("m/%d'/%d'/0'", coinType, purpose) + return fmt.Sprintf("m/%d'/%d'/0'", purpose, coinType) } // MasterPublicKeyFromMnemonic returns the master public key with the correct derivation for the given mnemonic.