From 21cf5c939da9b786f304448c446be5f12af582bc Mon Sep 17 00:00:00 2001 From: leohhhn Date: Thu, 29 Aug 2024 04:11:40 +0200 Subject: [PATCH] save --- examples/gno.land/p/demo/access/example_test.gno | 6 +++--- examples/gno.land/p/demo/access/set.gno | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/gno.land/p/demo/access/example_test.gno b/examples/gno.land/p/demo/access/example_test.gno index d47083b1252..fb5d41c5728 100644 --- a/examples/gno.land/p/demo/access/example_test.gno +++ b/examples/gno.land/p/demo/access/example_test.gno @@ -2,10 +2,10 @@ package access func ExamplePackageLevel() { // set this globally or during init() - acl := New() + set := New() // in functions - acl.AssertCurrentHasAccess() + set.AssertCallerHasAccess() } func ExampleEmbedding() { @@ -22,5 +22,5 @@ func ExampleEmbedding() { } // check from the context of the object. - myObject.Set.AssertCurrentHasAccess() + myObject.Set.AssertCallerHasAccess() } diff --git a/examples/gno.land/p/demo/access/set.gno b/examples/gno.land/p/demo/access/set.gno index 25a9ee4f67f..7548f055664 100644 --- a/examples/gno.land/p/demo/access/set.gno +++ b/examples/gno.land/p/demo/access/set.gno @@ -144,9 +144,9 @@ func (s *Set) ForceDel(addr std.Address) error { // Assert functions -// AssertCurrentHasAccess checks whgnether the PrevRealm is whitelisted as authorized +// AssertCallerHasAccess checks whether the caller is whitelisted as authorized // If not, it panics indicating restricted access -func (s *Set) AssertCurrentHasAccess() { +func (s *Set) AssertCallerHasAccess() { if err := s.CallerIsAuthorized(); err != nil { panic(ErrUnauthorized) }