Skip to content
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

Merged
merged 2 commits into from
Sep 16, 2023
Merged

refactor: use guard getters #8339

merged 2 commits into from
Sep 16, 2023

Conversation

erights
Copy link
Member

@erights erights commented Sep 16, 2023

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-errors that we had to add.

@erights
Copy link
Member Author

erights commented Sep 16, 2023

See #8340

@@ -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(),
Copy link
Member Author

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #8341

Copy link
Member

@michaelfig michaelfig left a 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.

packages/internal/src/callback.js Outdated Show resolved Hide resolved
@erights erights added automerge:rebase Automatically rebase updates, then merge and removed automerge:rebase Automatically rebase updates, then merge labels Sep 16, 2023
@erights erights added the automerge:rebase Automatically rebase updates, then merge label Sep 16, 2023
@mergify mergify bot merged commit b5a2ed1 into master Sep 16, 2023
80 checks passed
@mergify mergify bot deleted the markm-use-guard-getters branch September 16, 2023 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:rebase Automatically rebase updates, then merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants