Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
liorbond committed Sep 25, 2023
1 parent 1db3d6f commit e810040
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions x/compute/internal/keeper/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,13 @@ func (m Migrator) Migrate3to4(ctx sdk.Context) error {
var brokenContractKey types.BrokenContractKey
err := m.keeper.cdc.Unmarshal(brokenContractKeyBz, &brokenContractKey)
if err == nil {
fixedContractKey := types.ContractKey{
OgContractKey: brokenContractKey.OgContractKey.OgContractKey,
CurrentContractKey: brokenContractKey.CurrentContractKey.CurrentContractKey,
CurrentContractKeyProof: brokenContractKey.CurrentContractKeyProof,
var fixedContractKey types.ContractKey
if brokenContractKey.OgContractKey != nil && brokenContractKey.CurrentContractKey != nil {
fixedContractKey = types.ContractKey{
OgContractKey: brokenContractKey.OgContractKey.OgContractKey,
CurrentContractKey: brokenContractKey.CurrentContractKey.CurrentContractKey,
CurrentContractKeyProof: brokenContractKey.CurrentContractKeyProof,
}
}

m.keeper.SetContractKey(ctx, contractAddress, &fixedContractKey)
Expand Down

0 comments on commit e810040

Please sign in to comment.