extension
extension copied to clipboard
Resolve PSBT errors for Ordinals and Stamps with Ledger (The operation on device was rejected)
@kyranjamie I know there are some folks eagerly waiting on an update in this case. I was wondering if you know more already.
Sorry @314159265359879, I haven't had a look at this one yet. Adding some time to my calendar to investigate tomorrow.
Listing on magic eden there seems to be a similar issue (Chrome latest, wallet 6.18.0)
When initiating listing an ordinal on the site the first thing to pop up in the ledger display is "non-default sighash"...
after proceeding on ledger and signing: "the operation on device was rejected" error is displayed.
The Ordinal is on the standard index (zero). I retested it with a regular text inscription.
User shared more exact step sequence to reproduce:
Open leather extension Connect ledger Change account to account 2 - BTC segwit has BTC in it, taproot has ordinals in it Connect account 2 to ME Select list ordinal Press 'confirm' Press 'connect bitcoin' *on ledger - get message > "Non-default sighash" > "reject if not sure" Press 'continue' Confirm output Receive message on extension "The operation on device was rejected"
@314159265359879 when troubleshooting ledger issues, please try to ascertain what Bitcoin Ledger app version they're using.
I'm seeing this response back from the device:
{
"name": "TransportStatusError",
"message": "Ledger device: Invalid data received (0x6a80)",
"statusCode": 27264,
"statusText": "INCORRECT_DATA"
}
I have a feeling this may be some limitation of the device, but I'll dig deeper to try and figure out what exactly causes it to break. Maybe it's a ledger app bug.
The user had bitcoin ledger app 2.1.3 that is also what I retested with.
@kyranjamie any updates here about diagnostic info or next steps?
Users using a Ledger device with their wallet to sell SRC20 tokens also run into this error on stampscan.xyz and openstamp.io. Attempting to transfer SRC20 through these dapps leads to the same error:
Buying SRC20 does work as expected on these dapps.
Ledger devices have limitations that software transactions don't. I never tried buying SRC-20, but I'm not surprised it doesn't work, given earlier experiences working with these devices.
I think the best place to start here is simply failing better. I'd like thoughts/ideas on how we can improve the experience, even when it doesn't work. Some ideas:
- Custom error warnings on known-failing apps
- Error messages suggesting they contact the app's support team (makes noise)
- Some earlier expectation setting that Ledger isn't guaranteed to be 1:1 with software
@314159265359879 What's your latest sense of this bug's urgency level? It's P1 but I suspect P2.
The current workaround is to send the ordinal to a software wallet instead and then list it from there. There is no workaround for this issue when the user only wishes to list with Ledger on these marketplaces.
If the fix for this is to add error messages, that is not ideal for the user, they'd prefer to have the ability to sign the transactions with their device but I do think it is a good idea to warn them about this as soon as possible. Perhaps even when they set up Leather with a Ledger to tell them about some of the current limitations.
Listing & sending SRC-20 (and stamps?) is also rejected, tested on openstamp.io and stampscan.xyz.
Is there anything the marketplaces can do to make signing these transactions on a hardware device possible?
Might be fixed with: https://github.com/leather-wallet/extension/pull/5110
@314159265359879 can you or @DeeList QA to see if fixed?
A user who was trying to list an ordinal on gamma tested #5110 and it didn't fix their issue. They are getting the same error message as the current wallet. On the ledger device the error is « non default sighash »
and then on screen:
@kyranjamie @314159265359879
Users get a sighash warning, but that shouldn't be an issue that's erroring out. It just says that it's not a default one.
I think this is the part the transaction fails on, during the confirm transaction step:
if (st->inputs_total_amount < st->outputs.total_amount) {
PRINTF("Negative fee is invalid\n");
// negative fee transaction is invalid
SEND_SW(dc, SW_INCORRECT_DATA);
return false;
}
https://github.com/LedgerHQ/app-bitcoin-new/blob/2.2.2/src/handler/sign_psbt.c#L1327-L1335
When trying to sign a transaction with total inputs amount less than total outputs amount, it fails.
I don't think that's something we can fix ourselves.
That makes sense, so this is then a bug with coinselection? we shouldn't be trying sign a tx with a negative fee 🤔
@edgarkhanzadian to create issue with request for support in https://github.com/LedgerHQ/app-bitcoin-new
We'll also reach out to related app teams
@edgarkhanzadian have you been able to create an issue in the above repo, and if so, mind linking here?
Retested Sending SRC20 still fails. Tested on stampscan.xyz and openstamp.io
Sending Stamps with Leather in hardware mode does work. Tested on openstamp.io
@314159265359879 I've updated the title of this issue accordingly.
This issue may also cover listing issues which fail for Stamps, Ordinals, SRC20, BRC20 and Runes alike.
It is not clear to me if the root cause is the same. SRC20 sending is the most acute need because when we have that at least users can send them to a software wallet to list.