TenKeyLabs / dappwright

🏌🏼‍E2E testing for dApps using Playwright + MetaMask & Coinbase Wallet
https://www.npmjs.com/package/@tenkeylabs/dappwright
Other
83 stars 21 forks source link

Signin method #288

Closed alejogranerorequest closed 8 months ago

alejogranerorequest commented 8 months ago

Hey @osis , thank you for helping with the signing method, but checking deeply, the sign-in interface is part of the approve() process, which is very weird. Do you know if that can be added to the approval process without breaking the usual approval flow?

osis commented 8 months ago

approve is used to confirm a number of one-off use cases. It's a general confirmation action. Sign has been made to work whether the connection approval pops up or not. Which part of the flow is breaking for you? The idea is that you would be able to change approve with sign in and it should work. There hasn't been a change to the approve flow.

alejogranerorequest commented 8 months ago

Using the same Metamask popup for the approval process, the sign in screen is shown as part of the approval flow.

osis commented 8 months ago

yes, you would use the signin action method and it will do approval as a prerequisite to complete the action.

alejogranerorequest commented 8 months ago

I could make it work locally with wallet.signin(), but if I run it in CI, I get this error message: TypeError: wallet.signin is not a function. Is there a missing reference to the method?

osis commented 8 months ago

Hmmmm sounds like your CI is running the wrong version of Dappwright? That's the only think I can think of that would cause that error. 🤔

alejogranerorequest commented 8 months ago

Yes, you're right, I had version #2.5.5 and the latest one is #2.7.1. Now it's working, thank you!