Skip to content

Commit

Permalink
Merge pull request #18 from provenance-io/mwoods-figure/use-hdwallet-…
Browse files Browse the repository at this point in the history
…provenance-hrp-values

Replace hard coded main+testnet hrp values with ones defined in hdwallet for Provenance
  • Loading branch information
mwoods-figure authored Feb 10, 2022
2 parents 9e011b3 + 5ab8d04 commit a8ee40f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/kotlin/io/provenance/client/wallet/WalletSigner.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import cosmos.crypto.secp256k1.Keys
import io.provenance.client.grpc.Signer
import io.provenance.hdwallet.bip39.MnemonicWords
import io.provenance.hdwallet.common.hashing.sha256
import io.provenance.hdwallet.hrp.Hrp
import io.provenance.hdwallet.signer.BCECSigner
import io.provenance.hdwallet.wallet.Account
import io.provenance.hdwallet.wallet.Wallet
Expand All @@ -19,8 +20,8 @@ enum class NetworkType(
*/
val path: String
) {
TESTNET("tp", "m/44'/1'/0'/0/0'"),
MAINNET("pb", "m/505'/1'/0'/0/0")
TESTNET(prefix = Hrp.ProvenanceBlockchain.testnet, path = "m/44'/1'/0'/0/0'"),
MAINNET(prefix = Hrp.ProvenanceBlockchain.mainnet, path = "m/505'/1'/0'/0/0")
}

class WalletSigner(prefix: String, path: String, mnemonic: String, passphrase: String = "") : Signer {
Expand Down

0 comments on commit a8ee40f

Please sign in to comment.