fix: don't return with error in permissions check when no chain IDs are

found

Turns out that, when we return with an error, instead of
a non-statisfied check permissions response, we can run into cases where
members that should be kicked are not kicked.
This commit is contained in:
Pascal Precht 2023-06-19 09:06:27 +02:00 committed by Follow the white rabbit
parent 05e67b1838
commit a36202ff30
1 changed files with 1 additions and 1 deletions

View File

@ -1977,7 +1977,7 @@ func (m *Manager) checkPermissionToJoin(permissions []*protobuf.CommunityTokenPe
// if there are no chain IDs that match token criteria chain IDs // if there are no chain IDs that match token criteria chain IDs
// we aren't able to check balances on selected networks // we aren't able to check balances on selected networks
if len(erc20ChainIDsMap) > 0 && len(chainIDsForERC20) == 0 { if len(erc20ChainIDsMap) > 0 && len(chainIDsForERC20) == 0 {
return nil, errors.New("no chain IDs found to check token funds on") return response, nil
} }
ownedERC20TokenBalances := make(map[uint64]map[gethcommon.Address]map[gethcommon.Address]*hexutil.Big, 0) ownedERC20TokenBalances := make(map[uint64]map[gethcommon.Address]map[gethcommon.Address]*hexutil.Big, 0)