The `RFPSimpleStrategy._registerRecipient()` does not work when the strategy was created using the `useRegistryAnchor=true` causing that nobody can register to the pool
The `RFPSimpleStrategy` strategies can be created using the `useRegistryAnchor` which indicates whether to use the registry anchor or not. If the pool is created using the `useRegistryAnchor=true` the RFPSimpleStrategy._registerRecipient() will be reverted by RECIPIENT_ERROR. The problem is that when `useRegistryAnchor` is true, the variable recipientAddress is not collected so the function will revert by the RECIPIENT_ERROR.\\nI created a test where the strategy is created using the `userRegistryAnchor=true` then the `registerRecipient()` will be reverted by the `RECIPIENT_ERROR`.\\n```\\n// File: test/foundry/strategies/RFPSimpleStrategy.t.sol:RFPSimpleStrategyTest\\n// $ forge test --match-test "test_registrationIsBlockedWhenThePoolIsCreatedWithUseRegistryIsTrue" -vvv\\n//\\n    function test_registrationIsBlockedWhenThePoolIsCreatedWithUseRegistryIsTrue() public {\\n        // The registerRecipient() function does not work then the strategy was created using the\\n        // useRegistryAnchor = true.\\n        //\\n        bool useRegistryAnchorTrue = true;\\n        RFPSimpleStrategy custom_strategy = new RFPSimpleStrategy(address(allo()), "RFPSimpleStrategy");\\n\\n        vm.prank(pool_admin());\\n        poolId = allo().createPoolWithCustomStrategy(\\n            poolProfile_id(),\\n            address(custom_strategy),\\n            abi.encode(maxBid, useRegistryAnchorTrue, metadataRequired),\\n            NATIVE,\\n            0,\\n            poolMetadata,\\n            pool_managers()\\n        );\\n        //\\n        // Create profile1 metadata and anchor\\n        Metadata memory metadata = Metadata({protocol: 1, pointer: "metadata"});\\n        address anchor = profile1_anchor();\\n        bytes memory data = abi.encode(anchor, 1e18, metadata);\\n        //\\n        // Profile1 member registers to the pool but it reverted by RECIPIENT_ERROR\\n        vm.startPrank(address(profile1_member1()));\\n        vm.expectRevert(abi.encodeWithSelector(RECIPIENT_ERROR.selector, address(anchor)));\\n        allo().registerRecipient(poolId, data);\\n    }\\n```\\n
When the strategy is using `useRegistryAncho=true`, get the `recipientAddress` from the data:\\n```\\n    function _registerRecipient(bytes memory _data, address _sender)\\n        internal\\n        override\\n        onlyActivePool\\n        returns (address recipientId)\\n    {\\n        bool isUsingRegistryAnchor;\\n        address recipientAddress;\\n        address registryAnchor;\\n        uint256 proposalBid;\\n        Metadata memory metadata;\\n\\n        // Decode '_data' depending on the 'useRegistryAnchor' flag\\n        if (useRegistryAnchor) {\\n            /// @custom:data when 'true' // Remove the line below\\n> (address recipientId, uint256 proposalBid, Metadata metadata)\\n// Remove the line below\\n// Remove the line below\\n          (recipientId, proposalBid, metadata) = abi.decode(_data, (address, uint256, Metadata));\\n// Add the line below\\n// Add the line below\\n          (recipientId, recipientAddress, proposalBid, metadata) = abi.decode(_data, (address, address, uint256, Metadata));\\n\\n            // If the sender is not a profile member this will revert\\n            if (!_isProfileMember(recipientId, _sender)) revert UNAUTHORIZED();\\n```\\n
The pool created with a strategy using the `userRegistryAnchor=true` can not get `registrants` because `_registerRecipient()` will be reverted all the time. If the pool is funded but no one can be allocated since there is not registered recipients, the deposited funds by others may be trapped because those are not distributed since there are not `registrants`.
```\\n// File: test/foundry/strategies/RFPSimpleStrategy.t.sol:RFPSimpleStrategyTest\\n// $ forge test --match-test "test_registrationIsBlockedWhenThePoolIsCreatedWithUseRegistryIsTrue" -vvv\\n//\\n    function test_registrationIsBlockedWhenThePoolIsCreatedWithUseRegistryIsTrue() public {\\n        // The registerRecipient() function does not work then the strategy was created using the\\n        // useRegistryAnchor = true.\\n        //\\n        bool useRegistryAnchorTrue = true;\\n        RFPSimpleStrategy custom_strategy = new RFPSimpleStrategy(address(allo()), "RFPSimpleStrategy");\\n\\n        vm.prank(pool_admin());\\n        poolId = allo().createPoolWithCustomStrategy(\\n            poolProfile_id(),\\n            address(custom_strategy),\\n            abi.encode(maxBid, useRegistryAnchorTrue, metadataRequired),\\n            NATIVE,\\n            0,\\n            poolMetadata,\\n            pool_managers()\\n        );\\n        //\\n        // Create profile1 metadata and anchor\\n        Metadata memory metadata = Metadata({protocol: 1, pointer: "metadata"});\\n        address anchor = profile1_anchor();\\n        bytes memory data = abi.encode(anchor, 1e18, metadata);\\n        //\\n        // Profile1 member registers to the pool but it reverted by RECIPIENT_ERROR\\n        vm.startPrank(address(profile1_member1()));\\n        vm.expectRevert(abi.encodeWithSelector(RECIPIENT_ERROR.selector, address(anchor)));\\n        allo().registerRecipient(poolId, data);\\n    }\\n```\\n