Skip to content

Commit

Permalink
broken commit for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
dsainati1 committed Dec 13, 2023
1 parent e867648 commit 591471d
Showing 1 changed file with 18 additions and 27 deletions.
45 changes: 18 additions & 27 deletions migrations/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,6 @@ func (m *StorageMigration) migrateNestedValue(
}
}

// The array itself doesn't need to be replaced.
return

case *interpreter.CompositeValue:
composite := value

Expand All @@ -156,9 +153,6 @@ func (m *StorageMigration) migrateNestedValue(
composite.SetMember(m.interpreter, emptyLocationRange, fieldName, migratedValue)
}

// The composite itself does not have to be replaced
return

case *interpreter.DictionaryValue:
dictionary := value

Expand Down Expand Up @@ -207,29 +201,26 @@ func (m *StorageMigration) migrateNestedValue(

dictionary.SetKey(m.interpreter, emptyLocationRange, keyToSet, valueToSet)
}
}

// The dictionary itself does not have to be replaced
return
default:
// Assumption: all migrations only migrate non-container typed values.
for _, migration := range migrations {
converted := migration.Migrate(value)

if converted != nil {
// Chain the migrations.
// Probably not needed, because of the assumption above.
// i.e: A single non-container value may not get converted from two migrations.
// But have it here to be safe.
value = converted

newValue = converted

if reporter != nil {
reporter.Report(address, domain, key, migration.Name())
}
// Assumption: all migrations only migrate non-container typed values.
for _, migration := range migrations {
converted := migration.Migrate(value)

if converted != nil {
// Chain the migrations.
// Probably not needed, because of the assumption above.
// i.e: A single non-container value may not get converted from two migrations.
// But have it here to be safe.
value = converted

newValue = converted

if reporter != nil {
reporter.Report(address, domain, key, migration.Name())
}
}

return
}
return

}

0 comments on commit 591471d

Please sign in to comment.