Skip to content

Commit

Permalink
Merge branch 'master' into feat/hof-realm-gnome-integration
Browse files Browse the repository at this point in the history
  • Loading branch information
jeronimoalbi authored Dec 12, 2024
2 parents 6912719 + a85a53d commit 789253c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/gno.land/p/demo/membstore/membstore.gno
Original file line number Diff line number Diff line change
Expand Up @@ -205,5 +205,5 @@ func (m *MembStore) TotalPower() uint64 {
// the API of the member store is public and callable
// by anyone who has a reference to the member store instance.
func (m *MembStore) isCallerDAORealm() bool {
return m.daoPkgPath == "" || std.CurrentRealm().PkgPath() == m.daoPkgPath
return m.daoPkgPath != "" && std.CurrentRealm().PkgPath() == m.daoPkgPath
}
4 changes: 3 additions & 1 deletion examples/gno.land/r/gov/dao/v2/dao.gno
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ var (
members membstore.MemberStore // the member store
)

const daoPkgPath = "gno.land/r/gov/dao/v2"

func init() {
// Example initial member set (just test addresses)
set := []membstore.Member{
Expand All @@ -23,7 +25,7 @@ func init() {
}

// Set the member store
members = membstore.NewMembStore(membstore.WithInitialMembers(set))
members = membstore.NewMembStore(membstore.WithInitialMembers(set), membstore.WithDAOPkgPath(daoPkgPath))

// Set the DAO implementation
d = simpledao.New(members)
Expand Down

0 comments on commit 789253c

Please sign in to comment.