Dosbodoke / chooselife

An open source mobile app made for Highliners
0 stars 0 forks source link

Cached Highline (on async storage) is valid even if doesn't exist on database #48

Closed Dosbodoke closed 4 weeks ago

Dosbodoke commented 1 year ago

After wiping the database, the async storage had a cached Highline that pass the zod validation of useLastHighline > readAndParseItemFormStorage, but, when is dispatched via Redux and processed on the listeners, the database calls fail as it doesn't exist on it, the screen shows up normally but with no data.

Proposal: Validate if it exists on DB after validating the schema.