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

[BUG] Error message when attempting to claim airdrop at app.tangle.tools/claim #2273

Open
1 task done
validorange opened this issue Apr 26, 2024 · 6 comments
Open
1 task done
Assignees
Labels
bug 🪲 Something isn't working

Comments

@validorange
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

The claim airdrop dapp gives an error when I try to claim an airdrop from my Ledger device using Talisman wallet.
image
The airdrop remains unclaimed after the error.

Expected Behavior

I expected to receive the airdrop.

Steps To Reproduce

  1. I have attempted this in both Chrome and Opera with the same result
  2. Submit claim using Talisman extension connected to my Ledger wallet (Nano X). Ledger Polkadot address is 1D51dxpuGv1mWxstx7ERWyEWieLHSeQ8NBVX7VxkxT5PuKg.
  3. Specify a recipient address of 5HMnzhxodNNpAW9s2aa4js6ffgcJGBUJgxhKaS1V82CojdHA
  4. Click claim now and approve signing of the text on my Ledger wallet
  5. App immediately shows error message (which goes away almost immediately)

Screenshot

https://github.com/webb-tools/webb-dapp/assets/150610035/038f91a1-2a3f-40eb-b0c5-5d491c271d06

Anything else?

No response

@validorange validorange added the bug 🪲 Something isn't working label Apr 26, 2024
@1xstj
Copy link

1xstj commented Apr 30, 2024

This error is due to Tangle network not being supported by Ledger app, we plan to release a ledger app soon.

@validorange
Copy link
Author

I'm not sure Tangle/Ledger support is needed here. I'm signing the text with the Polkadot app on Ledger. The Polkadot address is eligible for airdrop based on being a Polkadot validator. The recipient address is a Tangle wallet and is not a Ledger wallet. Indeed the reason I am requesting the payout to a different address is that I don't expect to be able to use the Ledger with Tangle.

Is there an alternate way to claim the airdrop if this method is not supported?

@drewstone
Copy link
Contributor

We're investigating @validorange and will get back to you to re-test.

@AtelyPham AtelyPham self-assigned this May 7, 2024
@AtelyPham
Copy link
Member

After conducting some investigations, I have reached several conclusions:

  • By default, Ledger employs the ed25519 curve for signing messages. However, in the claim pallet, we use sr25519 to verify signatures from Substrate wallets here.
  • To verify an Ethereum signature from Ledger, we must modify the last bytes of the signature. For more information, please refer to https://mirror.xyz/coa.eth/mvPbLPXvy375CXi1_XwMTzG84lwlSKYUBHDx_R1TIgU.
  • In the case of Ledger signatures from Substrate wallets where their length exceeds 64 bytes (65 bytes and 66 bytes), the initial bytes are utilized to detect the cryptographic curve. The subsequent part constitutes the signature itself. You can refer to the signatureVerify function for further details.
    • For signatures of 65 bytes and 66 bytes, the getVerifyFn and verifyMultisig functions are employed. Initially, the first byte is used to determine the verification function, followed by the utilization of the remaining bytes (with the first byte truncated) as input for the verification function.

Regarding which signature scheme to use when users employ Ledger via Talisman, I'm uncertain. However, based on my research findings, I propose modifying the last byte if the signature is from EVM wallets and truncating the first byte if the signature is from Substrate wallets, whether both are via Ledger.

@AtelyPham
Copy link
Member

Hello, @validorange! Could you please try signing and claiming with your Ledger wallet on this PR preview link?

@validorange
Copy link
Author

Hi @AtelyPham ,
I tried your link and received a different error, which I didn't catch before it went away, but I believe it was "Invalid Transaction". I tried a second time and got the attached screenshot ("temporarily banned").
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working
Projects
Status: Building 🏗️
Development

Successfully merging a pull request may close this issue.

4 participants