airgap-it / airgap-vault

The AirGap Vault is installed on a spare smartphone that has no connection to any network, thus it is air gapped. This app handles the private key.
MIT License
390 stars 108 forks source link

Issue Signing on Optimism #199

Closed pvdyck closed 9 months ago

pvdyck commented 1 year ago

Signing this optimism transaction hangs just after the scan. Nothing happens ...

Capture d’écran 2023-08-04 à 08 15 19
AndreasGassmann commented 1 year ago

Hi. Could you let us know which version of the Vault you are using? Earlier versions of the Vault used to have problems with Optimism, but that should be fixed in the latest version.

pvdyck commented 1 year ago

Latest (3.28.0) Previously, when I had an issue with Optimism signing, I received a message saying so Now, the screen goes black after the QR scan and stays stuck there

pvdyck commented 1 year ago

@AndreasGassmann Were you able to reproduce ? It's a transaction exiting a beefy vault => https://app.beefy.finance/vault/velodrome-lusd-dai

pvdyck commented 1 year ago

@airgap-it any help here ?

pvdyck commented 1 year ago

Issue still there with latest release please HELP !

mlaeng commented 1 year ago

Hey @pvdyck I am sorry we couln't help yet. Can you tell us the exact setup you're using? I can't identify where the screenshot you posted is coming from. Is that Metamask + Airgap Vault?

pvdyck commented 1 year ago

@mlaeng Rabby chrome extension, how can I help you better to find out the exact issue? Thanks

mlaeng commented 1 year ago

@pvdyck In the meantime I was able to find out what your setup is. I got the Rabby extension and did setup one of my Optimism accounts from my Airgap vault to be used with it. I was able to deposit in this vault and then to withdraw from it:

https://app.beefy.finance/vault/velodrome-v2-op-velo

(The vault you were using doesn't allow deposits anymore, so I've chosen a similar one with Velodrome LP tokens)

Rabby did show me the QR code which I did scan with my AirGap Vault, then signed the tx in order to see the new QR on my AirGap vault and then scanned this from the Rabby wallet. Worked just fine.

And could easily sign using AirGap vault. I am using 3.29.0 (build 53670) on Android. Not sure what you are doing differently. May i ask what device you are using?

mlaeng commented 1 year ago

Not sure yet, on which step it fails for you. You say that after you scan the QR code that is displayed by Rabby, with your AirGap vault, the screen turns black instead of showing you a "Sign Transaction" screen with the transaction details?

pvdyck commented 1 year ago

Android - Motorola , all software updates installed (including the webview) / Airplane mode / Not using any other app on the phone Using Moto e7(i) Power / Android 10 Airgap-Vault latest version

mlaeng commented 1 year ago

@pvdyck does it look like this after scanning the Qr code?

image

pvdyck commented 1 year ago

yes, exactly, black screen !

mlaeng commented 1 year ago

Well, not completely black... Bizarre. I got the same when I scanned the QR code which you posted above. But If I scanned the Qr code that was displayed for me it worked without a problem... It is also the case that now I need to exit the AirGap Vault completely in order to get the camera again. I need to check something.

pvdyck commented 1 year ago

Great, as long as you can reproduce it ... The problem is half solved 😉

mlaeng commented 1 year ago

Do you have more than one account synced with Rabby?

mlaeng commented 1 year ago

@pvdyck I was able to reproduce the complete scenario with the same result

  1. I connected my account into rabby via "connect hardware wallets" and syncing from airgap vault. Rabby now shows my address 0xSomething
  2. everything works, I could sign from my airgap vault via QR code exchange
  3. now I deleted the secret I derived that account from from my AirGap Vault
  4. Rabby now still shows the account but if I try to create a transaction now and scan it with the vault I end up with the same black screen as you, because the vault does not have the secret anymore. same black display, same behaviour.

So my suspicion is that your AirGap Vault does not have the secret anymore which the account (the one which is connected in Rabby) was derived from. You probably have deleted it or you didn't import it back again after wiping... could that be?

mlaeng commented 1 year ago

@pvdyck pls let me know if that was the issue or if we have to look further...

pvdyck commented 1 year ago

I'll check in a couple of hours and get back to you, thanks for the great support

pvdyck commented 1 year ago

I just tried to scan a transaction on Polygon, it all worked perfectly. I suppose that the secret is still there. Could you please confirm that it disqualifies the "secret deleted" problem ? Could this be related to Optimism ?

pvdyck commented 1 year ago

Can you run the app in an emulator and check the logs ? Can I ( check the logs ) ?

mlaeng commented 1 year ago

@pvdyck it shouldn't be Optimism related, because Optimism interactions work just fine with my setup, which is pretty similar to yours. But I want to check something else as soon as I find time, thanks for your patience.

mlaeng commented 1 year ago

@pvdyck a thought I just had. Did you already try to remove the wallet from rabby and then connect it again?

pvdyck commented 1 year ago

No, will do and keep you posted. It's displayed properly in Rabby, the derivation path is correct.

mlaeng commented 1 year ago

is it another derivation index than 0?

pvdyck commented 1 year ago

Uninstalled/reinstalled Rabby / Reinstalled airgap vault's wallet - problem persists Same derivation index ( 0 )

pvdyck commented 1 year ago

Successfully signed transactions on Fantom, Avalanche, Polygon and BSC Only fails on Optimism

debeldami commented 9 months ago

Hi @pvdyck

To successfully sign transactions on Optimism, you have to add Optimism to your Vault. Failure to do so will result in a black screen during the signing process. I've verified and reproduced this issue, and it consistently occurs when Optimism is not added to the Vault. Please make sure to include Optimism in your Vault to avoid encountering this problem. I will now close the issue.

pvdyck commented 9 months ago

Thanks ! It might be useful to catch this and display an informative message.

peterwilli commented 4 months ago

Hi @pvdyck

To successfully sign transactions on Optimism, you have to add Optimism to your Vault. Failure to do so will result in a black screen during the signing process. I've verified and reproduced this issue, and it consistently occurs when Optimism is not added to the Vault. Please make sure to include Optimism in your Vault to avoid encountering this problem. I will now close the issue.

Thanks that solved it for me! It would be a good idea to actually mention this somewhere, this kept me up for hours!