Skip to content

Commit

Permalink
fix: use SafeConvertAddress in gov
Browse files Browse the repository at this point in the history
  • Loading branch information
hoank101 committed May 8, 2024
1 parent 0033911 commit c6f6fb5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bech32-migration/gov/gov.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ func MigrateAddressBech32(ctx sdk.Context, storeKey storetypes.StoreKey, cdc cod
if err != nil {
vote := v1.Vote{}
cdc.MustUnmarshal(bz, &vote)
vote.Voter = utils.ConvertAccAddr(vote.Voter)
vote.Voter = utils.SafeConvertAddress(vote.Voter)
voteCount++
return cdc.MustMarshal(&vote)
}
vote.Voter = utils.ConvertAccAddr(vote.Voter)
vote.Voter = utils.SafeConvertAddress(vote.Voter)
voteCount++
return cdc.MustMarshal(&vote)
})
Expand All @@ -44,11 +44,11 @@ func MigrateAddressBech32(ctx sdk.Context, storeKey storetypes.StoreKey, cdc cod
if err != nil {
vote := v1.Deposit{}
cdc.MustUnmarshal(bz, &vote)
deposit.Depositor = utils.ConvertAccAddr(deposit.Depositor)
deposit.Depositor = utils.SafeConvertAddress(deposit.Depositor)
depositCount++
return cdc.MustMarshal(&deposit)
}
deposit.Depositor = utils.ConvertAccAddr(deposit.Depositor)
deposit.Depositor = utils.SafeConvertAddress(deposit.Depositor)
depositCount++
return cdc.MustMarshal(&deposit)
})
Expand Down

0 comments on commit c6f6fb5

Please sign in to comment.