Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes: permalinks for docs #8838

Merged
merged 19 commits into from
Mar 10, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix multisig account pubkeys migration (#8794)
closes: #8776
  • Loading branch information
akhilkumarpilli authored and charleenfei committed Mar 10, 2021
commit 93ac8feb38e84d351b18f25e20f76adc2c3e6058
14 changes: 11 additions & 3 deletions x/auth/legacy/v040/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package v040

import (
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
multisigtypes "github.com/cosmos/cosmos-sdk/crypto/keys/multisig"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
v039auth "github.com/cosmos/cosmos-sdk/x/auth/legacy/v039"
v040auth "github.com/cosmos/cosmos-sdk/x/auth/types"
Expand All @@ -11,9 +12,16 @@ import (
// convertBaseAccount converts a 0.39 BaseAccount to a 0.40 BaseAccount.
func convertBaseAccount(old *v039auth.BaseAccount) *v040auth.BaseAccount {
var any *codectypes.Any
// If the old genesis had a pubkey, we pack it inside an Any. Or else, we
// just leave it nil.
if old.PubKey != nil {

_, ok := old.PubKey.(*multisigtypes.LegacyAminoPubKey)

// If pubkey is multisig type, then leave it as nil for now
// Ref: https://github.com/cosmos/cosmos-sdk/issues/8776#issuecomment-790552126
// Else if the old genesis had a pubkey, we pack it inside an Any.
// Or else, we just leave it nil.
if ok {
// TODO migrate multisig public_keys
} else if old.PubKey != nil {
var err error
any, err = codectypes.NewAnyWithValue(old.PubKey)
if err != nil {
Expand Down