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

[FIX] Reject grant permission cancel transaction #5115

Merged
merged 2 commits into from
Dec 15, 2022

Conversation

tommasini
Copy link
Contributor

@tommasini tommasini commented Oct 11, 2022

Description
When we tried to reject permission for a contract to be able to use the wallet funds, we didn't answer back to the dapp and did not cancel the transaction. This would let the dapp be waiting for some answer.

Proposed Solution
Cancel the transaction when the user rejects the permission

Code Impact
Low

Screenshots/Recordings
The issue:
https://recordit.co/3kEkR6MBZA
The solution:
https://recordit.co/abWG79D8rJ

Test Case
Case1:

  • Go to https://swap.cow.fi/#/swap?chain=mainnet on our in app browser, chrome or chrome desktop
  • Connect (via wallet connect or in-app browser)
  • SWAP WETH for one random token like ZRX (Can not be ether, try always a token that we usually do not swap)
  • Press "Allow cow swape to use your WETH"
  • On MM mobile app, reject the permission that is being asked

Issue

Progresses #4482

Checklist

  • There is a related GitHub issue
  • Tests are included if applicable
  • Any added code is fully documented

@tommasini tommasini requested a review from a team as a code owner October 11, 2022 14:14
@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@tommasini tommasini added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Oct 11, 2022
Copy link
Contributor

@blackdevelopa blackdevelopa left a comment

Choose a reason for hiding this comment

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

LGTM. Kindly confirm the copy, You've rejected granting permission with Design and Product.

@tommasini
Copy link
Contributor Author

@blackdevelopa Thanks for the review! Waiting for answer 🚀

Copy link
Contributor

@blackdevelopa blackdevelopa left a comment

Choose a reason for hiding this comment

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

Awesome work, Tomas. 🚀

@tommasini tommasini added Mobile QA board needs-qa Any New Features that needs a full manual QA prior to being added to a release. and removed needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) labels Oct 13, 2022
Copy link
Member

@cortisiko cortisiko left a comment

Choose a reason for hiding this comment

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

This PR is QA passed!

@cortisiko cortisiko added QA Passed A successful QA run through has been done and removed needs-qa Any New Features that needs a full manual QA prior to being added to a release. labels Dec 15, 2022
@cortisiko cortisiko merged commit 6387d1b into main Dec 15, 2022
@cortisiko cortisiko deleted the fix/4482-notify-dapp-reject-permission branch December 15, 2022 20:54
@github-actions github-actions bot locked and limited conversation to collaborators Dec 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
QA Passed A successful QA run through has been done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants