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

refactor: use isValidTransaction from SDK #1285

Merged
merged 1 commit into from
Dec 6, 2022
Merged

Conversation

iamacook
Copy link
Member

What it solves

Resolves #1238

How this PR fixes it

useIsValidExecution has been refactored to use isValidTransaction from safe-core-sdk instead.

Duplicate tests have been removed as the library has full test coverage here.

How to test it

Attempt to execute an invalid transaction and observe the "This transaction will most likely fail. To save gas costs, reject this transaction." error.

Screenshots

image

@iamacook iamacook requested a review from schmanu November 29, 2022 17:00
@github-actions
Copy link

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@github-actions
Copy link

Copy link
Member

@katspaugh katspaugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, -150 lines!

Copy link
Member

@schmanu schmanu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All bueno from my side :)

@francovenica
Copy link
Contributor

Looks good to me.
I tried a few tx that were going to fail on purpose:
Trying to send more funds than the safe has
Trying to add an owner that already exist
Trying to remove an owner that is not an owner anymore

@iamacook iamacook merged commit 73d70be into dev Dec 6, 2022
@iamacook iamacook deleted the sdk-valid-transaction branch December 6, 2022 17:14
@github-actions github-actions bot locked and limited conversation to collaborators Dec 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate to use isValidTransaction from safe-core-sdk
4 participants