Skip to content

refactor: use guard getters#8339

Merged
mergify[bot] merged 2 commits intomasterfrom
markm-use-guard-getters
Sep 16, 2023
Merged

refactor: use guard getters#8339
mergify[bot] merged 2 commits intomasterfrom
markm-use-guard-getters

Conversation

@erights
Copy link
Copy Markdown
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
Copy Markdown
Member Author

erights commented Sep 16, 2023

See #8340

@erights erights force-pushed the markm-use-guard-getters branch from ec34450 to 111c33a Compare September 16, 2023 09:19
M.remotable('instanceAdmin'),
).returns(M.promise()),
deleteInstanceAdmin: M.call(InstanceAdminI).returns(),
deleteInstanceAdmin: M.call(InstanceAdminShape).returns(),
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@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
@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