spacemeshos / smapp-lite

The light wallet application for Spacemesh network
3 stars 2 forks source link

Add verify address button to Receive modal #83

Closed brusherru closed 1 month ago

brusherru commented 2 months ago

It is requested by Ledger company to add a "verify" button on "Receive" modal, that asks User to verify the address on his Ledger device. So now it is implemented.

It may require design improvement or rephrasing.

image image image

And there is also possible another case with red text, saying: "The address is incorrect, probably you are using another Ledger device." :)

github-actions[bot] commented 2 months ago

You can preview the changes at : https://e1239a33.smapp-lite-prod.pages.dev

github-actions[bot] commented 1 month ago

You can preview the changes at : https://df41b117.smapp-lite-prod.pages.dev

github-actions[bot] commented 1 month ago

You can preview the changes at : https://0fcd607e.smapp-lite-prod.pages.dev

brusherru commented 1 month ago

@monikasmolarek thanks! Fixed. There are two new messages for the cases:

  1. When the address is rejected on the device, it does not require to reconnect anymore, but displays:

    image
  2. When the device is locked or not connected there will be another message (in case User closes the "connect device" popup). Example:

    image image
brusherru commented 1 month ago

When the tx/action is pending on the device, the Wallet gets really confused about the device connection.

The problem here that we cannot cancel the operation on the ledger device if you close the window. And at the same time, Ledger works in a synchronous way, which means if you run another operation while the previous one was not finished — it causes transport error, which also causes disconnecting from the device.

The only thing I can do here is to disable closing the popup once "Verify" button was clicked. So I tweaked it, and hopefully it will work well :D

image

However, if you reload the page and click "Verify" once again — we don't have any chance to handle it properly in the app.

github-actions[bot] commented 1 month ago

You can preview the changes at : https://96c11141.smapp-lite-prod.pages.dev

brusherru commented 1 month ago

Ok, I'm pretty sure it is fine, so I'm merging it. If we find out any problems — I'll fix it :)