NexusMutual / cover-router

Computes optimal capacity allocation per Nexus Mutual staking pool on cover purchase
MIT License
1 stars 1 forks source link

fix: remove old data #95

Closed MilGard91 closed 3 weeks ago

MilGard91 commented 4 weeks ago

Context

When we update productPool data we fetch all the pools for a product and it data, if manager removes product from the pool by changing the values to 0, we don't update it since StakingViewer only returns only pools that have those values. Stale data never gets removed and then is used in calculation, that gives bigger capacities. Currently the only way to fix this is to remove cache file and refetch data.

Issue: #91

Changes proposed in this pull request

Test plan

Checklist

Review

When reviewing a PR, please indicate intention in comments using the following emojis:

roxdanila commented 3 weeks ago

Can you also fill in the Context section explaining what the bug is?