Skip to content
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

Remove validator check that wrongly fails for certain wallets #8057

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions app/economy/tx.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,15 @@ def grants_transaction_validator(contribution, w3):
# Validator currently assumes msg.sender == originator as described above
response['originator'] = [ receipt['from'] ]

# Return if recipient is not the BulkCheckout contract
is_bulk_checkout = is_bulk_checkout_tx(receipt)
if not is_bulk_checkout:
to_address = receipt['to']
response['validation']['comment'] = f'This function only validates transactions through the BulkCheckout contract, but this transaction was sent to {to_address}'
return response
# The below check was commented out since it wrongly fails for transactions sent via Argent
# and other wallets that use meta-transactions or relayers

# # Return if recipient is not the BulkCheckout contract
# is_bulk_checkout = is_bulk_checkout_tx(receipt)
# if not is_bulk_checkout:
# to_address = receipt['to']
# response['validation']['comment'] = f'This function only validates transactions through the BulkCheckout contract, but this transaction was sent to {to_address}'
# return response

# Parse receipt logs to look for expected transfer info. We don't need to distinguish
# between ETH and token transfers, and don't need to look at any other receipt parameters,
Expand Down