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

Bump orangekit packages to 1.0.0-beta.31 #729

Merged
merged 3 commits into from
Sep 30, 2024

Conversation

kkosiorowska
Copy link
Contributor

@kkosiorowska kkosiorowska commented Sep 19, 2024

This PR updates the package for orangeKit/react to 1.0.0-beta.31. What's Changed:

  • Ledger accounts support by Xverse
  • Reduce the modals displayed to one for Xverse (connection action). Note that only one modal is displayed for Connect wallet modal (+ one additional one for Sign message) so we for the full connecting + signing process we only need 2 modals now instead of 3 for Xverse.

Note that you should use the latest version of the Xverse wallet.

@kkosiorowska kkosiorowska self-assigned this Sep 19, 2024
Copy link

netlify bot commented Sep 19, 2024

Deploy Preview for acre-dapp ready!

Name Link
🔨 Latest commit 1d7d02d
🔍 Latest deploy log https://app.netlify.com/sites/acre-dapp/deploys/66f6d136817d950008490cde
😎 Deploy Preview https://deploy-preview-729--acre-dapp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Sep 19, 2024

Deploy Preview for acre-dapp-testnet ready!

Name Link
🔨 Latest commit 1d7d02d
🔍 Latest deploy log https://app.netlify.com/sites/acre-dapp-testnet/deploys/66f6d1362803bc0008d94cf3
😎 Deploy Preview https://deploy-preview-729--acre-dapp-testnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@michalinacienciala

This comment was marked as resolved.

@michalinacienciala

This comment was marked as resolved.

@michalinacienciala

This comment was marked as duplicate.

@michalinacienciala
Copy link
Contributor

michalinacienciala commented Sep 23, 2024

Issue 4 (?)

I'm not quite sure if this is a bug or not...

Steps:

  1. Successfully connect to Acre using Ledger via Xverse
  2. Wait for the Ledger device to lock in (i.e. wait till it shows the PIN screen) or disconnect it and connect it again, without providing PIN
  3. Try to initiate deposit

Result:
After clicking Confirm on the message signature window in Xverse and Continuing on the next info window, you get Transaction failed error in Xverse and Unexpected error in Acre:

image
image

Screen.Recording.2024-09-23.at.15.38.17.mov

Tested on
https://deploy-preview-729--acre-dapp.netlify.app/ (mainnet, 8ce1238)
Ledger Live: 2.84.1
Bitcoin app: 2.3.0
Xverse: 0.42.1


[EDIT]

Similar behavior observed when user tries to do a deposit when their Ledger is unlocked (after PIN entering), but Bitcoin app is not opened. The result is identical, with the only difference being the error in Xverse:
image

Also, similar thing happens when user tries to sign the deposit while their Ledger is unlocked and in Bitcoin app, but user rejects the signature in the Ledger device. In such case we also see the Unexpected error in Acre, and this error in Xverse:
image

@michalinacienciala

This comment was marked as off-topic.

@michalinacienciala
Copy link
Contributor

michalinacienciala commented Sep 24, 2024

Summary of tests

Tests done using 'regular' Xverse account

  • Reject dapp connection > NOOK (ISSUE 2)
  • Accept dapp connection, Cancel SIWE > OK
  • Accept dapp connection, Cancel SIWE, Xverse > NOOK (ISSUE 1)
  • Accept dapp connection, accept SIWE > OK
  • Logout > OK
  • Log in after logging out > OK
  • Page refresh after logging in, log in again > OK
  • Change wallet addresses in the extension > OK
  • Change network in the extension > OK
  • Try doing deposit after switching in wallet to different address > NOOK (ISSUE 3)
  • Try doing withdraw after switching in wallet to different address > OK
  • Try doing deposit/withdraw after switching in wallet to different network > NOOK? Transaction failed (asked about this behavior on Discord)
  • Withdraw, reject > OK
  • Withdraw, sign > OK
  • Deposit, reject > OK
  • Deposit, sign > OK

Tests done using Ledger account via Xverse

  • Reject dapp connection > NOOK (ISSUE 2)
  • Accept dapp connection, Cancel SIWE > OK
  • Accept dapp connection, Cancel SIWE, Xverse > NOOK (ISSUE 1)
  • Accept dapp connection, 'Sign' SIWE, 'Cancel' > OK
  • Accept dapp connection, 'Sign' SIWE, 'Connect', 'Cancel' > OK
  • Accept dapp connection, 'Sign' SIWE, 'Connect', reject signature in Ledger > OK
  • Accept dapp connection, 'Sign' SIWE, 'Connect' while not logged in to Ledger, enter PIN in Ledger, enter Bitcoin app > NOOK? (ISSUE 5)
  • Accept dapp connection, 'Sign' SIWE, 'Connect' while logged in, but not in the Bitcoin app > NOOK? (ISSUE 5)
  • Accept dapp connection, accept SIWE > OK
  • Logout > OK
  • Log in after logging out > OK
  • Page refresh after logging in, log in again > OK
  • Change wallet addresses in the extension > OK
  • Change network in the extension > OK
  • Try doing deposit after switching in wallet to different address > NOOK (ISSUE 3)
  • Try doing withdraw after switching in wallet to different address > OK
  • Try doing deposit/withdraw after switching in wallet to different network > NOOK? Transaction failed (asked about this behavior on Discord)
  • Withdraw, cancel while assembling 1st tx > OK? (after cancelling we can still see the Negotiated version... in logs but after a while we have Transaction succesfull... in logs followed by Withdrawal cancelled. The tx id: https://etherscan.io/tx/0xbd9eb493405d2f835b282a5c367eb826f304bee582fb7403e33dfb5bea478b4f#eventlog.)
  • Withdraw, cancel in Xverse sign window > OK
  • Withdraw, locked Ledger > OK
  • Withdraw, unlocked Ledger, not in Bitcoin app > NOOK? (ISSUE 5)
  • Withdraw, sign > OK
  • Deposit, reject > OK
  • Deposit, sign ('Confirm'), Cancel > OK
  • Deposit, sign ('Confirm'), Connect, X > OK
  • Deposit, sign('Confirm'), Connect, Continue (while locked) > NOOK? (ISSUE 4)
  • Deposit, sign('Confirm'), Connect, Continue (while unlocked, but not in Bitcoin app) > NOOK? (ISSUE 4)
  • Deposit, sign('Confirm'), Connect, Continue, reject signature in Ledger > NOOK? (ISSUE 4)
  • Deposit, sign > OK

@kkosiorowska
Copy link
Contributor Author

kkosiorowska commented Sep 24, 2024

Issue 1

Issue 2

Fix in #731.

Issue 3

Currently, OrangeKit does not notify the dApp about account switching. I created a special task for this problem -https://github.com/thesis/orangekit/issues/132. Hopefully, we'll get to it soon.

Issue 4

I believe it is not a bug because we catch that something is wrong and display an error message. But definitely in this case the error messages should be more precise. I see that in the console we get a message about what is wrong so we can improve it. @michalinacienciala please create a separate task for this.

Screenshot 2024-09-24 at 09 44 40

[EDIT]

I realized that Ledger displays an error message at its window. So I am not sure if we should duplicate this information. We would probably like the user to be able to retry the action after unlocking the device. Currently, we display an error message to the user and then the flow is stopped. Before we create a ticket, let's ask @SorinQ for suggestions.

However, I still believe that this is not a bug but some flow improvement.

Issue 5

Sounds like a problem on the Xverse side. However, I will investigate the issue and let you know.

[EDIT]

I tried to reproduce this issue but could not do it. However, I talked to Michalina and she received the following error in the console for this issue. This is definitely a Xverse-specific issue, and I don't think there is anything we can do about it.

Screenshot 2024-09-24 at 10 51 33

@kkosiorowska
Copy link
Contributor Author

kkosiorowska commented Sep 24, 2024

Withdraw, cancel while assembling 1st tx > OK? (after cancelling we can still see the Negotiated version... in logs but after a while we have Transaction succesfull... in logs followed by Withdrawal cancelled. The tx id: https://etherscan.io/tx/0xbd9eb493405d2f835b282a5c367eb826f304bee582fb7403e33dfb5bea478b4f#eventlog.)

I confirmed it with @r-czajkowski. This transaction is sent on behalf of the bitcoin address corresponding to the safe. It is always sent when the user uses a given BTC address for the first time. This is nothing to worry about.

@michalinacienciala
Copy link
Contributor

Let's update the OrangeKit to 1.00-beta.32 version (which contains this change: https://github.com/thesis/orangekit/pull/141/files). This can help with the issue with Safe creation that we had luck to catch in Mezo, but not in Acre.
Once we have that change in, I think we can merge the PR - all issues observed during earlier tests have been either resolved or moved outside the scope of the PR. There wasn't anything major observed, Xverse works with Ledger and regular accounts pretty smooth now.

@michalinacienciala michalinacienciala merged commit c7b6246 into main Sep 30, 2024
28 checks passed
@michalinacienciala michalinacienciala deleted the orangekit-1.0.0-beta.31 branch September 30, 2024 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants