Revert "Mege PR #5092: changed bench32prefixes" (#5283)

This reverts commit 5a310fabbd.
This commit is contained in:
Alexander Bezobchuk
2019-11-06 10:18:48 -07:00
committed by GitHub
parent 5a310fabbd
commit ede9aaed3b
2 changed files with 9 additions and 13 deletions
+8 -12
View File
@@ -17,17 +17,14 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
)
func bech32Prefixes() []string {
config := sdk.GetConfig()
return []string{
config.GetBech32AccountAddrPrefix(),
config.GetBech32AccountPubPrefix(),
config.GetBech32ValidatorAddrPrefix(),
config.GetBech32ValidatorPubPrefix(),
config.GetBech32ConsensusAddrPrefix(),
config.GetBech32ConsensusPubPrefix(),
}
var config = sdk.GetConfig()
var bech32Prefixes = []string{
config.GetBech32AccountAddrPrefix(),
config.GetBech32AccountPubPrefix(),
config.GetBech32ValidatorAddrPrefix(),
config.GetBech32ValidatorPubPrefix(),
config.GetBech32ConsensusAddrPrefix(),
config.GetBech32ConsensusPubPrefix(),
}
type hexOutput struct {
@@ -48,7 +45,6 @@ type bech32Output struct {
}
func newBech32Output(bs []byte) bech32Output {
bech32Prefixes := bech32Prefixes()
out := bech32Output{Formats: make([]string, len(bech32Prefixes))}
for i, prefix := range bech32Prefixes {
bech32Addr, err := bech32.ConvertAndEncode(prefix, bs)