onflow / flowkit

Apache License 2.0
6 stars 10 forks source link

[BUG] `accounts.AddOrUpdate` doesn't update the existing account when passing a different struct instance #53

Closed bartolomej closed 2 months ago

bartolomej commented 3 months ago

Current Behavior

Nothing gets updated when updating an existing account by constructing a new instance with a matching name.

Expected Behavior

The account state should be updated as long as the new account name matches the existing account, regardless if the struct instance is different.

Steps To Reproduce

You can reproduce this by removing the Remove call in our code here: https://github.com/bartolomej/fri-flowser-playground/blob/7b32fc2f045904fca14a6c1f6f08706828272709/internal/project/project.go#L194-L202

Environment

N/A

What are you currently working on that this is blocking?

No response