CirclesUBI / circles-groups-safe-app

[DEPRECATED] Mint Circles group tokens using this Safe app
https://groups.circlesubi.dev/
1 stars 1 forks source link

[DAPP] Usage of Group Minting Options to allow minting for different types of users #209

Closed LaimeJesus closed 1 year ago

LaimeJesus commented 1 year ago

related #187

Description

This PRs add all the necessary changes to use the groups "flags" (onlyOwners/onlyTrusted) to only allow to mint to a specific type of users:

How to test

First of all, this PR only adds the DAPP logic we need to do some improvements in the UI and how the data is shown. Secondly, we need to test the display and update of the new settings information in the different pages: group information, group configuration and group mint. Finally, as this new feature affect the way of how to mint, we need to pay attention to all the cases where we configure this settings:

Group being tested: 0x8c767b35123496469b21af9df28b1927b77441a7

Group Information

information-page-group-allowed-users

Group Configuration

configuration-page-group-allowed-users

As we call 2 contract methods we will see 2 tx grouped in a single one to accept

update-mint-settings-set-both-variables

Group Mint

Group only allow owners to mint

user is not owner: gno:0x173c894917aC31E5bDBD4C7F54105D26A94ABF18

mint

user is owner: gno:0xB77d3948693B6dEE0F85184db515CE4910C21fe9

mint-page-allowed-owner-user

Group only allow trusted (members) to mint

image

members of the group

group-members-modal

user is not member: gno:0x256175A6e2CE81f4217Bd2D2D240888C0a53bDA1

a-not-group-member-can-not-mint

user is member: gno:0xff7D68f4BE5381Ae7d4Df449E134D51E8246C7b8

a-group-member-can-mint

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
circles-groups-safe-app ✅ Ready (Inspect) Visit Preview Aug 22, 2022 at 0:45AM (UTC)
LaimeJesus commented 1 year ago

Good job, I could change the type of user that can mint in a group. tada I only have some little comments:

Is there a way to disable mint tokens link in the groups list and in the group information page if the user is not allowed to mint?

Yes that's possible but I'd add those features in a different PR we can create an issue and discuss about that*

What do you think about moving Input.tsx and InputLabelText.tsx components to the components/form folder?

I think it makes more sense to have them there, so I'll move them! The only issue is that we are creating components with "similar" names somewhere, it can be a bit confusing but anyways I think those component should be in the other folder*