Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(examples): In r/demo/boards public API, change AssertOriginCall…
…() to PrevRealm().IsUser() (gnolang#2358) In r/demo/boards, `std.AssertOriginCall()` blocks calling the API from another realm. But it also prevents using MsgRun for testing as we do in PR gnolang#1583. Therefore, we change to check `std.PrevRealm().IsUser()`. This still blocks another realm from calling the code, but allows being [called by MsgRun](https://github.com/gnolang/gno/blob/d7f12167eff72cd4a12e9e8b8aaa30dc241bfb6c/misc/stress-test/stress-test-many-posts/main.go#L148-L156) where a user keypair sends the transaction. <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] Added references to related issues and PRs </details> --------- Signed-off-by: Jeff Thompson <jeff@thefirst.org> Co-authored-by: Leon Hudak <33522493+leohhhn@users.noreply.github.com>
- Loading branch information