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

Add gas control on token allowance #789

Open
hernandoagf opened this issue Jun 19, 2023 · 2 comments
Open

Add gas control on token allowance #789

hernandoagf opened this issue Jun 19, 2023 · 2 comments

Comments

@hernandoagf
Copy link

Is your feature request related to a problem? Please describe.
The library I'm using to handle the contract interactions and token allowances does not make a correct calculation of gas in the local testnet. I noticed there's an option to set custom gas for Metamask transactions using Synpress, but not on token allowances.

Describe the solution you'd like
I'd like to be able to customize the gas to use on the cy.confirmMetamaskPermissionToSpend() function.

Describe alternatives you've considered
I tried using the cy.confirmMetamaskPermissionToSpend() function to approve a token allowance, but that does not work.
Another way to fix this could be by setting a global gas object for all of the transactions during the tests.

Additional context
I'm getting this error when trying to approve spending a token, and I have no way to increase the gas.
Screenshot 2023-06-19 at 19 52 35

@stavares843
Copy link

cy.activateAdvancedGasControlInMetamask()`

Activate ability (in metamask settings) to specify custom gas price and limit while doing transactions in metamask.

noticed this in the docs

@hernandoagf
Copy link
Author

@stavares843 Thank you for your reply. That seems to work only for the cy.confirmMetamaskTransaction() function, there doesn't seem to be a way to set up a global gas config, and the cy.confirmMetamaskPermissionToSpend() function only accepts an allowance amount, no gas config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants