airgap-it / beacon-sdk

The beacon sdk allows developers of dApps and wallets on Tezos to implement the wallet interaction standard tzip-10.
https://walletbeacon.io
MIT License
101 stars 65 forks source link

Unable to connect to wallet and UI glitches #663

Closed simonmcl closed 8 months ago

simonmcl commented 11 months ago

Describe the bug (current behavior) Opened 3Route (where I was previously logged in), tried to make a swap. Saw a modal in the top right telling me it was waiting for my wallet, but no message came through to kukai when inspecting console/network traffic.

When I attempted to click the X in the top right of the modal, instead of disappearing/cancelling, it just got smaller and reamined on the screen with no ability to remove it. Had to refresh page to remove

Screenshot 2023-11-15 at 15 22 31

To Reproduce Steps to reproduce the behavior:

  1. Go to 3Route.io
  2. Login
  3. Request a trade
  4. Wait for popup
  5. Tap X

Environment

AndreasGassmann commented 11 months ago

Hi, thanks for the reports. There are 2 separate issues here:

  1. Regarding the connection problem, it's hard to say what was going on. If the wallet shows the "Request sent" modal, it means that the request has been sent, but no acknowledge message has been received. This is usually the case if the wallet isn't open (eg. Kukai tab closed, App on mobile not open, etc.). Once the app is then open, the acknowledgement will be sent back to the dApp and the text will change to "Awaiting confirmation".

It seems that in your screenshot, the text says "Awaiting...", which would indicate that the wallet did receive and acknowledge the request. Did you take that screenshot later on to show the UI glitch, so it's not actually related to the original problem?

Because if it was stuck at the "Request sent" modal, then the error is most likely somewhere in the beacon communication, but if it's stuck at "Awaiting response", then it's most likely a wallet problem (UI not shown or in a different tab) because the request was acknowledged.

  1. Regarding the UI glitch. The toasts are draggable in case they hide important UI. It seems that when you close and swipe at the same time, it will "minify" it like on your screenshot, instead of closing it. We'll look into that.

https://github.com/airgap-it/beacon-sdk/assets/680814/745e12da-c0f2-4748-8524-f1d061750392

simonmcl commented 11 months ago

Re: issue 1:

I didn't have kukai web open at the time I clicked swap. I saw no "request sent" modal. The first modal I saw was "Awaiting confirmation". After that popped up without a link to kukai web, I manually opened kukai web. Nothing came through to kukai and the modal never changed

Re: issue 2:

I defiantly didn't drag anything, i just clicked on it. I've seen this happen before on OBJKT where the modal had a link to cancel the request. It minified but remained big enough to tap again. Each time it got smaller and smaller. If it thinks i'm dragging, then theres a bug in the drag detection

IsaccoSordo commented 11 months ago

Hi @simonmcl, about issue n. 2, with #665 we now set a min width and height to the toast so that it can't completely collapse. Relevant lines of code: toast/index.tsx#L66-#L72

EDIT: Deployed version to test it: https://e83bc9c1ca486fba4087531d4fba9190e13d386d--beacon-sdk.netlify.app

IsaccoSordo commented 8 months ago

This issue is solved since v4.1.1