status-go/api
Pascal Precht 2cbced95c5 Check token funds when handling community requests to join
This adds checks to `HandleCommunityRequestToJoin` and
`AcceptRequestToJoinCommunity` that ensure a given user's revealed
wallet addresses own the token funds required by a community.

When community has token permissions of type `BECOME_MEMBER`, the
following happens when the owner receives a request:

1. Upon verifying provided wallet addresses by the requester, the owner
   node accumulates all token funds related to the given wallets that
   match the token criteria in the configured permissions
2. If the requester does not meet the necessary requirements, the
   request to join will be declined. If the requester does have the
   funds, he'll either be automatically accepted to the community, or
   enters the next stage where an owner needs to manually accept the
   request.
3. The the community does not automatically accept users, then the funds
   check will happen again, when the owner tries to manually accept the
   request. If the necessary funds do not exist at this stage, the
   request will be declined
4. Upon accepting, whether automatically or manually, the owner adds the
   requester's wallet addresses to the `CommunityDescription`, such that
   they can be retrieved later when doing periodic checks or when
   permissions have changed.
2023-03-23 08:40:31 +01:00
..
multiformat Add spiff workflow cmd 2023-03-16 14:31:34 +00:00
.gitignore Fix some tests & upgrade contracts 2021-07-20 10:57:38 +02:00
app_state.go Clean api package (#1055) 2018-06-27 10:11:45 +02:00
app_state_test.go Clean api package (#1055) 2018-06-27 10:11:45 +02:00
backend.go upgrade ethereum 2022-10-26 09:39:30 +02:00
backend_test.go test: `TestConvertAccount` test update 2023-01-27 13:20:52 +01:00
defaults.go Dont set backup disabled datadir in defaults 2023-03-22 13:31:16 +00:00
geth_backend.go Check token funds when handling community requests to join 2023-03-23 08:40:31 +01:00
test_helpers.go replace deprecated ioutil.TempDir with os.MkdirTemp 2023-01-03 15:40:11 +01:00
utils.go synchronize display name (#2989) 2022-12-29 14:16:19 +08:00
utils_test.go Use goimports instead of gofmt 2020-01-06 10:17:23 +01:00