Skip to content

Commit

Permalink
fix(gno-dao): remove workaround
Browse files Browse the repository at this point in the history
Signed-off-by: Norman Meier <[email protected]>
  • Loading branch information
n0izn0iz committed Oct 30, 2024
1 parent 163cbad commit 7224220
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions gno/r/dao_realm/dao_realm.gno
Original file line number Diff line number Diff line change
Expand Up @@ -70,22 +70,7 @@ func init() {

daoCore = dao_core.NewDAOCore(votingModuleFactory, proposalModulesFactories, messageHandlersFactories)

// dao_registry.Register(func() dao_interfaces.IDAOCore { return daoCore }, "DAO Realm", "Default testing DAO", "https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?w=1080&fit=max")
}

// FIXME: the registry is currently broken in 'gno test', see https://github.com/gnolang/gno/issues/1852
// so we're exposing a way to register after DAO instantiation
func RegisterSelf() {
if registered {
panic("already registered")
}

dao_registry.Register(func() dao_interfaces.IDAOCore { return daoCore }, "DAO Realm", "Default testing DAO", "https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?w=1080&fit=max")
registered = true
}

func Render(path string) string {
return daoCore.Render(path)
}

func VoteJSON(moduleIndex int, proposalID int, voteJSON string) {
Expand Down

0 comments on commit 7224220

Please sign in to comment.