Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gno/orgs): save & display kind of organizations #1469

Merged

Conversation

MikaelVallenet
Copy link
Member

@MikaelVallenet MikaelVallenet commented Dec 30, 2024

an organization could be based on different kinds:

  • roles
  • memberships
  • tokens
  • ...

This information should be saved into contracts & retrievable to be able to adapt business logic depending on the kind of the org.

The PR scope is to save it and display it in UPP


View of UPP org after PR

image

&&

image

Copy link

netlify bot commented Dec 30, 2024

Deploy Preview for gno-dapp ready!

Name Link
🔨 Latest commit 532c09e
🔍 Latest deploy log https://app.netlify.com/sites/gno-dapp/deploys/6776a82ff138830008bf8d67
😎 Deploy Preview https://deploy-preview-1469--gno-dapp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Dec 30, 2024

Deploy Preview for teritori-dapp ready!

Name Link
🔨 Latest commit 532c09e
🔍 Latest deploy log https://app.netlify.com/sites/teritori-dapp/deploys/6776a82f8f954200089797f3
😎 Deploy Preview https://deploy-preview-1469--teritori-dapp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@MikaelVallenet MikaelVallenet marked this pull request as ready for review January 2, 2025 10:41
@MikaelVallenet MikaelVallenet requested review from n0izn0iz, hthieu1110, clegirar and WaDadidou and removed request for n0izn0iz January 2, 2025 10:42
@@ -94,7 +94,7 @@ func RegisterSelf() {
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")
dao_registry.Register(func() dao_interfaces.IDAOCore { return daoCore }, "DAO Realm", "Default testing DAO", "memberships based organization", "https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?w=1080&fit=max")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The registry should only be mapping from realm pkgpath to IDAOCore, the additional fields were there when the profile realm didn't exist but they should be removed actually, this is a review mistake by me when we moved to profile realm for daos

I think we should handle the "dao kind" by inspecting the dao voting module, which already has a .Info() api

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So when listing (for the screens w/ all daos) should i fetch profile realm (name, bio & avatar) for each field of each DAO ?

I did what you suggest to handle the dao kind by inspecting the dao voting module using the Info().String() endpoint

Copy link
Collaborator

@n0izn0iz n0izn0iz Jan 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see two option there:

  • query the profile realm in the registry list function and enrich the response within gno
  • use the useUserInfo hook like we do for users, it already supports gno dao if I'm not mistaken

Copy link
Collaborator

@n0izn0iz n0izn0iz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@WaDadidou WaDadidou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

@WaDadidou WaDadidou added this pull request to the merge queue Jan 3, 2025
Merged via the queue into main with commit c7b7de7 Jan 3, 2025
23 checks passed
@n0izn0iz n0izn0iz deleted the dev/mikaelvallenet/feat/gno-orgs-save-and-display-org-kind branch January 3, 2025 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants