spesmilo / electrum

Electrum Bitcoin Wallet
https://electrum.org
MIT License
7.38k stars 3.07k forks source link

"address unknown" for tx inputs in txdetails on android #8978

Open pony-montana opened 6 months ago

pony-montana commented 6 months ago

Hi, when I click to a tx to see the details of the inputs and the outputs, I see for most txs "address unknown" and "unknown amount" in the inputs. The outputs, instead, always shows correctly.

The only cases where the inputs shows correctly are for the address that belong to my wallet (so all the outgoing txs basically).

SomberNight commented 5 months ago

The difference between tx inputs and outputs here is that the transaction itself contains all data about the outputs, but not for the inputs. The inputs are only referred to by prevout, so to be able to display an "input address" or an "input amount", the parent/prev txs are also required.

When we have the prev tx, the input address/amount are displayed, otherwise "unknown" is shown. The prev txs should always be already available for "outgoing" txs (sends) but typically they are not available locally for "incoming" txs (receives).

The desktop Qt gui has the same behaviour, except there there is an opt-in option "Download missing data" (added in https://github.com/spesmilo/electrum/commit/d83863cc528e87c152c5b31f38cc86ab619bc72d), which when enabled, missing prev txs are requested from the electrum server.

pony-montana commented 5 months ago

do you think would be a good option to add the "download missing data" function also on android? It would be a per tx switch or a global state that apply to all tx?