[BUG] Error message when attempting to claim airdrop at app.tangle.tools/claim
Is there an existing issue for this?
- [X] 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.
The airdrop remains unclaimed after the error.
Expected Behavior
I expected to receive the airdrop.
Steps To Reproduce
- I have attempted this in both Chrome and Opera with the same result
- Submit claim using Talisman extension connected to my Ledger wallet (Nano X). Ledger Polkadot address is 1D51dxpuGv1mWxstx7ERWyEWieLHSeQ8NBVX7VxkxT5PuKg.
- Specify a recipient address of 5HMnzhxodNNpAW9s2aa4js6ffgcJGBUJgxhKaS1V82CojdHA
- Click claim now and approve signing of the text on my Ledger wallet
- 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
This error is due to Tangle network not being supported by Ledger app, we plan to release a ledger app soon.
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?
We're investigating @validorange and will get back to you to re-test.
After conducting some investigations, I have reached several conclusions:
- By default, Ledger employs the
ed25519curve for signing messages. However, in the claim pallet, we usesr25519to 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
signatureVerifyfunction for further details.- For signatures of 65 bytes and 66 bytes, the
getVerifyFnandverifyMultisigfunctions 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.
- For signatures of 65 bytes and 66 bytes, the
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.
Hello, @validorange! Could you please try signing and claiming with your Ledger wallet on this PR preview link?
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").
This issue is stale because it has been open for 60 days with no activity.
Closed due to staleness; you may reopen or create a new issue if the error persists.