-
Notifications
You must be signed in to change notification settings - Fork 156
Horizon: bug fixes #1183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: horizon
Are you sure you want to change the base?
Horizon: bug fixes #1183
Conversation
Signed-off-by: Tomás Migone <tomas@edgeandnode.com>
Signed-off-by: Tomás Migone <tomas@edgeandnode.com>
Horizon: bug fixes
🚨 Report Summary
For more details view the full report in OpenZeppelin Code Inspector |
@@ -102,6 +102,8 @@ contract GraphTallyCollector is EIP712, GraphDirectory, Authorizable, IGraphTall | |||
bytes calldata _data, | |||
uint256 _tokensToCollect | |||
) private returns (uint256) { | |||
require(_paymentType == IGraphPayments.PaymentTypes.QueryFee, GraphTallyCollectorInvalidPaymentType(_paymentType)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks a little strange that we take an input where we only accept one value, maybe we should get rid of the parameter and rename this to _collectQueryFees()
? Changes might be more involved so if we want to keep things minimal this sounds good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could move this check to collect()
and remove the param in this fn. That being said, this is already being audited...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree that it looks weird in this particular case but the reason is because it's part of the IPaymentsCollector
interface, for a generic collector we need the payment type as a parameter because we might have collectors that process multiple types of payments.
Signed-off-by: Tomás Migone <tomas@edgeandnode.com>
Signed-off-by: Tomás Migone tomas@edgeandnode.com