This pull request addresses an issue with the logical grouping in the filters_to_use assignment. The current logic does not properly handle the case where filters is not None, leading to potential runtime errors. By adding parentheses, we ensure the correct evaluation of the condition.
Current Code
if filters is None then [base_memcmp_opt] + []
else filters
Issue
As is, if filters is not None, then the account discriminator memcmp is dropped from the list of filters to use.
Proposed Fix
if filters is None then [base_memcmp_opt] + ([])
else [base_memcmp_opt] + filters
Solution
Adding parentheses ensures that the conditional expression is evaluated correctly.
Description
This pull request addresses an issue with the logical grouping in the filters_to_use assignment. The current logic does not properly handle the case where filters is not None, leading to potential runtime errors. By adding parentheses, we ensure the correct evaluation of the condition.
Current Code
Issue As is, if filters is not None, then the account discriminator memcmp is dropped from the list of filters to use.
Proposed Fix
Solution Adding parentheses ensures that the conditional expression is evaluated correctly.