synpress
synpress copied to clipboard
How can I add/import a token
Hi, is there a function that I can use to add/import a token?
Hey @blackpintz. Sadly there is no such function yet, but I will try to implement it until end of this week. Expect it to be included in next synpress release, which is expected until Monday.
Cheers, Jakub.
@drptbl Okay, thank you. Another issue I am having is trying to call confirmMetamaskTransaction(). I keep getting this error:
CypressError: `cy.task('confirmMetamaskTransaction')` failed with the following error:
> waiting for function failed: timeout 30000ms exceeded
Not sure if it is me calling it wrongly.
You can find my code for this here: https://github.com/blackpintz/FE-Challenge/tree/e2e-tests
And I am using synpress run. Please advise.
@drptbl Okay, thank you. Another issue I am having is trying to call
confirmMetamaskTransaction(). I keep getting this error:CypressError: `cy.task('confirmMetamaskTransaction')` failed with the following error: > waiting for function failed: timeout 30000ms exceededNot sure if it is me calling it wrongly. You can find my code for this here: https://github.com/blackpintz/FE-Challenge/tree/e2e-tests And I am using
synpress run. Please advise.
It worked when I used cy.confirmMetamaskPermissionToSpend() instead.
Hey @blackpintz, this has been added in latest synpress version which is @synthetixio/[email protected].
cy.confirmMetamaskAddToken()(to confirm adding a new custom token)cy.importMetamaskToken('0x509ee0d083ddf8ac028f2a56731412edd63223b9')(to import new token) orcy.importMetamaskToken({ address: '0x509ee0d083ddf8ac028f2a56731412edd63223b9', symbol: 'USDT'})(to set custom symbol)
Thanks, Jakub.