remove only emulator accounts
@@ -124,6 +124,11 @@ func (p *project) cleanState() {
accs := make([]flowkit.Account, len(*p.state.Accounts()))
copy(accs, *p.state.Accounts()) // we need to make a copy otherwise when we remove order shifts
for _, a := range accs {
+ chain, err := util.GetAddressNetwork(a.Address())
+ if err != nil || chain != flow.Emulator {
+ continue // don't remove non-emulator accounts
+ }
+
if a.Name() == config.DefaultEmulatorServiceAccountName {
continue
}
