-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(action): handle missing Collateral allocation #7195
Conversation
Datadog ReportBranch report: ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change LGTM.
probably merits a regression test.
Agree. More general fix could be for "getCurrentAllocation" to be more honest about the possible return values so that this would have been caught statically. Fine my be to make that a ticket for the queue since it will probably require many assertions.
Add
after |
I tried this and it does spawn many errors. Filed away as #7198 |
818edfb
to
0d4d5a9
Compare
``` 2023-03-20T23:18:07.574Z SwingSet: ls: v40: Error: "leftAmount" (an undefined) must be a pass-by-copy record, not "undefined" at construct () at Error (/bundled-source/.../node_modules/ses/src/error/tame-error-constructor.js:56) at makeError (/bundled-source/.../node_modules/ses/src/error/assert.js:242) at fail (/bundled-source/.../node_modules/ses/src/error/assert.js:370) at assertRecord (.../marshal/src/typeGuards.js:70) at checkLRAndGetHelpers (.../ertp/src/amountMath.js:145) at isGTE (.../ertp/src/amountMath.js:190) at settleAtNewRate (.../inter-protocol/src/auction/auctionBook.js:356) ``` test
the `any` type for `zcf` cascaded to the rest of the function
refs: #6930
Description
Fix code that assumed
getCurrentAllocation()
would include an amount in the.Collateral
property.Designed in collaboration with @Chris-Hibbert
Testing Considerations
probably merits a regression test.