helium / helium-ledger-app

The official Helium app for the Ledger Nano S
Apache License 2.0
32 stars 8 forks source link

Unable to send from ledger nano s account. No error displayed but Tx AWOL #25

Closed loupiote closed 3 years ago

loupiote commented 3 years ago

I deposited some HNT to my ledger account. Now I am unable to send them. I am using the "rust" companion app.

$ .\helium-ledger-app.exe balance
Communicating with Ledger - follow prompts on screen
+-----------------------------------------------------+-------------+--------------+-----------------+
| Address                                             | Balance HNT | Data Credits | Security Tokens |
+-----------------------------------------------------+-------------+--------------+-----------------+
| 13H8CerbqMsGkZpnbBeEsHtEp9A4ovExpK643PNpBg5gCUzy6XD | 0.95000000  | 0            | 0               |
+-----------------------------------------------------+-------------+--------------+-----------------+
$ .\helium-ledger-app.exe pay 13hJHN2vCFaawVadyJGXgFk82AG4ovtqmZkvBsLcPLUuEpFS462 hnt 0.949
Communicating with Ledger - follow prompts on screen
Creating transaction for:
      0.94900000 HNT
        =
      94900000 Bones
Transaction fee: 35000 DC (1 DC = $.00001)
If account has no DCs, HNT will be burned automatically to fund transaction based on current oracle price
+-----------------------------------------------------+------------+-------+---------------------------------------------+
| Payee                                               | Amount HNT | Nonce | Hash                                        |
+-----------------------------------------------------+------------+-------+---------------------------------------------+
| 13hJHN2vCFaawVadyJGXgFk82AG4ovtqmZkvBsLcPLUuEpFS462 | 0.94900000 | 1     | EKGhe4azQ0YKhtUZ1Z7d4Q4Pd097jmi_0L-iMzH0tvw |
+-----------------------------------------------------+------------+-------+---------------------------------------------+

The Tx (approved on my ledger) was apparently never sent :frowning: I am running the helium-ledger-app.exe on win10, and my Ledger is a Nano S with the latest Helium app installed (v1.0.0). Nano S firmware 1.6.1. Is there a way to figure out the issue, and most importantly, to recover the HNT that I transferred to my Nano S account?

loupiote commented 3 years ago

The message " If account has no DCs, HNT will be burned automatically to fund transaction based on current oracle price " seems to be incorrect.

Even if I try to send just 0.55 HNT, no HNT is burned to pay for the fees. The Tx just fails silently...

https://api.helium.io/v1/pending_transactions/v6jKOImxjvg4t9mSVtMIAnwL75fTw2NhJFbsYkxR_Ok

on this page: https://docs.helium.com/blockchain/transaction-fees/

It says: As long as the Helium wallet being used to submit the transaction contains enough HNT to burn to DCs to fund the transaction, the burn will happen implicitly, requiring no user intervention.

So this seems to be a bug in helium-ledger-app. It should correctly burn the funds and send my Tx, since the Tx cost is much less than the funds left in my account, in this case: Accounts has 0.95 HNT, I send 0.55, there are 0.4 HNT left (> 5 USD), and the Tx fee is 0.35 USD.

How can I recover my HNT now?

abhay commented 3 years ago

If I'm reading the issue correctly, the balance on the sender account seems to be ~0.01 HNT.

https://explorer.helium.com/accounts/13H8CerbqMsGkZpnbBeEsHtEp9A4ovExpK643PNpBg5gCUzy6XD

loupiote commented 3 years ago

Yes, now I realize. It appeared to me as being 0.95 because the app was displaying 0.95 when I asked for the balance, even though there was a pending Tx that finally went through.

This is the dialog on discord:

oilbird — Today at 12:31 AM Did you realize that ONCHimoznRrv0gAv_1GSBieThKXhsDCaA4hexHtA1A4 went through?

loupiote — Today at 12:34 AM Ok, I see now I didn't realize because the balance displayed by the app was still 0.95 HNT, even though a Tx was pending So it looks like still a bug in the app: it should deduce any pending Tx from the balance All the other cryptos that I know do that when you have a pending Tx, the amount of the Tx is deduced from the account balance. and it is put back the the Tx fails Also, it is no frustrating that the Tx fails silently, and unless the user knows hot to use the API REST endpoint, there is no way they can know about the failure But I guess we are eating "dog food" i.e. using a very alpha version of the Helium ledger app. And there is not even any single Helium wallet that can be used to recover access to the accounts from the BIP39 seed :frowning:

loupiote commented 3 years ago

Here are the chronological commands from my terminal:

$ .\helium-ledger-app.exe balance
Communicating with Ledger - follow prompts on screen
+-----------------------------------------------------+-------------+--------------+-----------------+
| Address                                             | Balance HNT | Data Credits | Security Tokens |
+-----------------------------------------------------+-------------+--------------+-----------------+
| 13H8CerbqMsGkZpnbBeEsHtEp9A4ovExpK643PNpBg5gCUzy6XD | 0.95000000  | 0            | 0               |
+-----------------------------------------------------+-------------+--------------+-----------------+
$ .\helium-ledger-app.exe pay 13hJHN2vCFaawVadyJGXgFk82AG4ovtqmZkvBsLcPLUuEpFS462 hnt 0.95
Communicating with Ledger - follow prompts on screen
Creating transaction for:
      0.95000000 HNT
        =
      95000000 Bones
Transaction fee: 35000 DC (1 DC = $.00001)
If account has no DCs, HNT will be burned automatically to fund transaction based on current oracle price
+-----------------------------------------------------+------------+-------+---------------------------------------------+
| Payee                                               | Amount HNT | Nonce | Hash                                        |
+-----------------------------------------------------+------------+-------+---------------------------------------------+
| 13hJHN2vCFaawVadyJGXgFk82AG4ovtqmZkvBsLcPLUuEpFS462 | 0.95000000 | 1     | P_hXhJY0W4UduOOcVcvC6JFG_dS4Dtj3OWud_sdijoE |
+-----------------------------------------------------+------------+-------+---------------------------------------------+
PS C:\Users\Tristan\Downloads\helium-ledger-app-1.1.2-x86_64-pc-windows-gnu\helium-ledger-app-1.1.2-x86_64-pc-windows-gnu> .\helium-ledger-app.exe balance
Communicating with Ledger - follow prompts on screen
+-----------------------------------------------------+-------------+--------------+-----------------+
| Address                                             | Balance HNT | Data Credits | Security Tokens |
+-----------------------------------------------------+-------------+--------------+-----------------+
| 13H8CerbqMsGkZpnbBeEsHtEp9A4ovExpK643PNpBg5gCUzy6XD | 0.95000000  | 0            | 0               |
+-----------------------------------------------------+-------------+--------------+-----------------+
$ .\helium-ledger-app.exe pay 13hJHN2vCFaawVadyJGXgFk82AG4ovtqmZkvBsLcPLUuEpFS462 hnt 0.949
Communicating with Ledger - follow prompts on screen
Creating transaction for:
      0.94900000 HNT
        =
      94900000 Bones
Transaction fee: 35000 DC (1 DC = $.00001)
If account has no DCs, HNT will be burned automatically to fund transaction based on current oracle price
+-----------------------------------------------------+------------+-------+---------------------------------------------+
| Payee                                               | Amount HNT | Nonce | Hash                                        |
+-----------------------------------------------------+------------+-------+---------------------------------------------+
| 13hJHN2vCFaawVadyJGXgFk82AG4ovtqmZkvBsLcPLUuEpFS462 | 0.94900000 | 1     | EKGhe4azQ0YKhtUZ1Z7d4Q4Pd097jmi_0L-iMzH0tvw |
+-----------------------------------------------------+------------+-------+---------------------------------------------+
$ .\helium-ledger-app.exe balance
Communicating with Ledger - follow prompts on screen
+-----------------------------------------------------+-------------+--------------+-----------------+
| Address                                             | Balance HNT | Data Credits | Security Tokens |
+-----------------------------------------------------+-------------+--------------+-----------------+
| 13H8CerbqMsGkZpnbBeEsHtEp9A4ovExpK643PNpBg5gCUzy6XD | 0.95000000  | 0            | 0               |
+-----------------------------------------------------+-------------+--------------+-----------------+
$ .\helium-ledger-app.exe pay 13hJHN2vCFaawVadyJGXgFk82AG4ovtqmZkvBsLcPLUuEpFS462 hnt 0.915
Communicating with Ledger - follow prompts on screen
Creating transaction for:
      0.91500000 HNT
        =
      91500000 Bones
Transaction fee: 35000 DC (1 DC = $.00001)
If account has no DCs, HNT will be burned automatically to fund transaction based on current oracle price
+-----------------------------------------------------+------------+-------+---------------------------------------------+
| Payee                                               | Amount HNT | Nonce | Hash                                        |
+-----------------------------------------------------+------------+-------+---------------------------------------------+
| 13hJHN2vCFaawVadyJGXgFk82AG4ovtqmZkvBsLcPLUuEpFS462 | 0.91500000 | 1     | ONCHimoznRrv0gAv_1GSBieThKXhsDCaA4hexHtA1A4 |
+-----------------------------------------------------+------------+-------+---------------------------------------------+
$ .\helium-ledger-app.exe balance
Communicating with Ledger - follow prompts on screen
+-----------------------------------------------------+-------------+--------------+-----------------+
| Address                                             | Balance HNT | Data Credits | Security Tokens |
+-----------------------------------------------------+-------------+--------------+-----------------+
| 13H8CerbqMsGkZpnbBeEsHtEp9A4ovExpK643PNpBg5gCUzy6XD | 0.95000000  | 0            | 0               |
+-----------------------------------------------------+-------------+--------------+-----------------+
$ .\helium-ledger-app.exe pay 13hJHN2vCFaawVadyJGXgFk82AG4ovtqmZkvBsLcPLUuEpFS462 hnt 0.55
Communicating with Ledger - follow prompts on screen
Creating transaction for:
      0.55000000 HNT
        =
      55000000 Bones
Transaction fee: 35000 DC (1 DC = $.00001)
If account has no DCs, HNT will be burned automatically to fund transaction based on current oracle price
+-----------------------------------------------------+------------+-------+---------------------------------------------+
| Payee                                               | Amount HNT | Nonce | Hash                                        |
+-----------------------------------------------------+------------+-------+---------------------------------------------+
| 13hJHN2vCFaawVadyJGXgFk82AG4ovtqmZkvBsLcPLUuEpFS462 | 0.55000000 | 2     | v6jKOImxjvg4t9mSVtMIAnwL75fTw2NhJFbsYkxR_Ok |
+-----------------------------------------------------+------------+-------+---------------------------------------------+
PS C:\Users\Tristan\Downloads\helium-ledger-app-1.1.2-x86_64-pc-windows-gnu\helium-ledger-app-1.1.2-x86_64-pc-windows-gnu> .\helium-ledger-app.exe balance
Communicating with Ledger - follow prompts on screen
+-----------------------------------------------------+-------------+--------------+-----------------+
| Address                                             | Balance HNT | Data Credits | Security Tokens |
+-----------------------------------------------------+-------------+--------------+-----------------+
| 13H8CerbqMsGkZpnbBeEsHtEp9A4ovExpK643PNpBg5gCUzy6XD | 0.95000000  | 0            | 0               |
+-----------------------------------------------------+-------------+--------------+-----------------+
$ .\helium-ledger-app.exe pay 13hJHN2vCFaawVadyJGXgFk82AG4ovtqmZkvBsLcPLUuEpFS462 hnt 0.6
Communicating with Ledger - follow prompts on screen
Creating transaction for:
      0.60000000 HNT
        =
      60000000 Bones
Transaction fee: 35000 DC (1 DC = $.00001)
If account has no DCs, HNT will be burned automatically to fund transaction based on current oracle price
+-----------------------------------------------------+------------+-------+---------------------------------------------+
| Payee                                               | Amount HNT | Nonce | Hash                                        |
+-----------------------------------------------------+------------+-------+---------------------------------------------+
| 13hJHN2vCFaawVadyJGXgFk82AG4ovtqmZkvBsLcPLUuEpFS462 | 0.60000000 | 3     | GlubZcwmczDCqwFSXyeqGhX9wC_jD5hepnwbjUgyTnw |
+-----------------------------------------------------+------------+-------+---------------------------------------------+
$ .\helium-ledger-app.exe balance
Communicating with Ledger - follow prompts on screen
+-----------------------------------------------------+-------------+--------------+-----------------+
| Address                                             | Balance HNT | Data Credits | Security Tokens |
+-----------------------------------------------------+-------------+--------------+-----------------+
| 13H8CerbqMsGkZpnbBeEsHtEp9A4ovExpK643PNpBg5gCUzy6XD | 0.95000000  | 0            | 0               |
+-----------------------------------------------------+-------------+--------------+-----------------+
$ .\helium-ledger-app.exe balance
Communicating with Ledger - follow prompts on screen
+-----------------------------------------------------+-------------+--------------+-----------------+
| Address                                             | Balance HNT | Data Credits | Security Tokens |
+-----------------------------------------------------+-------------+--------------+-----------------+
| 13H8CerbqMsGkZpnbBeEsHtEp9A4ovExpK643PNpBg5gCUzy6XD | 0.01425507  | 0            | 0               |
+-----------------------------------------------------+-------------+--------------+-----------------+
$
loupiote commented 3 years ago

So the fact that the balance is incorrect (i.e. ignores any pending Tx) makes this very confusing.

lthiery commented 3 years ago

@loupiote thanks for the feedback!

So it looks like still a bug in the app: it should deduce any pending Tx from the balance

I'll file a feature request against our API for this. Unsure if it fits their current model for doing things, but it certainly seems nice from a user perspective.

Also, it is no frustrating that the Tx fails silently, and unless the user knows hot to use the API REST endpoint, there is no way they can know about the failure

I'm working on the ledger app this week and I think I'll think about ways to improve on this. At the very least, outputting the URL seems appropriate.

I'm going to close this issue for now in favor of more targeted "feature request" issues