-
Notifications
You must be signed in to change notification settings - Fork 208
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
refactor: use guard getters #8339
Conversation
See #8340 |
ec34450
to
111c33a
Compare
@@ -224,7 +224,7 @@ export const InstanceStorageManagerIKit = harden({ | |||
InstanceHandleShape, | |||
M.remotable('instanceAdmin'), | |||
).returns(M.promise()), | |||
deleteInstanceAdmin: M.call(InstanceAdminI).returns(), | |||
deleteInstanceAdmin: M.call(InstanceAdminShape).returns(), |
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.
This bug was only caught by seeing #8340 fail , because it uses the stricter endojs/endo#1712
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.
See #8341
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.
LGTM! I'd love to see this land in the SDK.
To pave the way for endojs/endo#1712 , switch from directly accessing the fields of guards to using the guard type's validating payload getter, and then accessing the fields of the payload.
See also endojs/endo#1771, which would enable us to remove the two
@ts-expect-error
s that we had to add.