It’s not really clear what doesn’t work. You should probably put that repeating code in a function.
The second screenshot doesn’t show what happens with ‘ut’. Are you placing it back inside the Hashmap? Are you calling the updateTeamValueInfo inside update call or query.
Ok so I checked my backup of my data from earlier and everyone had a bank balance of zero so it isn’t that this function is setting them to zero, it is as you suspected that the change isn’t saving.
Oh, well, I didn’t understand the problem in full, but I’m glad I could be of some help
I assume Hashmap is from Motoko base. If your fantasyTeams is stable var and updatedFantasyTeams is a Class - that may be the problem. (But probably not)
So we have a class with private var with another class instance and the functions of the first class can’t replace that var. You can isolate it in Motoko playground and see if that’s the problem and I guess it will be a bug then?
Or it may be that the function you use to see the changes is bad.
Recently had a bug like this
let some = { another with bankbalance = 123 }
assuming another has default values. Motoko didn’t typecheck properties when ‘with’ was used. And in this case it should of been bankBalance. Probably not your case, just mentioning it anyway.