fix trip value change calc for boosted trips + add typecheck on PR#261
Conversation
f795984 to
2556fbd
Compare
|
ok I also took the liberty of adding a typescheck to PR workflow since otherwise you don't see typescript errors until merging/testing locally, it's catching some issues, adding a commit to work around those but you should probably fix it |
|
ok build is green now, subsequent runs should be much faster since pnpm cache will be used after first green you need to delete the claim-frontend and auction-frontend sub-packages or clean them up in some way, up to you (e.g. replace with static pages that say "SORRY IT'S OVER") for example: and delete the merkle tree package etc you should also use solc that is less than 2 years old and listen to the warnings, most of these are auto-fixable, your build will break once 0.9.0 is out and you're not seeing the deprecation warnings because your solc is too old |
|
ok did more cleanup, you can put static routes on the claims if you'd like, removed unused sub-packages and exclude filters so the typecheck config is clean PR review is fast now with cache |
the trip lab UI uses incorrect chamber value basis if the trip was boosted before any rats have gone in:
in this case both trips drained the pool but the first one shows a positive pool contribution because the basis is chamber creation value, not its actual value at that time
this fixes the logic to coalesce to oldTripValue (accounts for boosts) first before creation cost, which corrects the display error
still coalesces to creation cost in any cases where oldTripvalue is not defined so should be safe to apply, also we use nullish instead of truthy check in case there's a corner case where the chamber was at 0 due to race condition or hypothetical spooky actions (probably overly defensive as this should never happen but good practice)