explorer icon indicating copy to clipboard operation
explorer copied to clipboard

Displaying tx with no recipients/ 0 value

Open FrediDealCash opened this issue 5 years ago • 6 comments

The explorer is displaying tx with 0 value and/or txs with no recipients

Any chance this can be changed so that the explorer only displays transactions that have recipients &/or a value greater than 0?

explorer

Thanks a lot for your time!

FrediDealCash avatar Aug 24 '20 21:08 FrediDealCash

I'm interested into this too. I follow.

B1ackt34 avatar Aug 31 '20 19:08 B1ackt34

Sorry guys, I've been swamped with work that I haven't been too active.

That table is referencing /ext/getlasttxesajax/0 from here: https://github.com/iquidus/explorer/blob/9692ab958a08893ea40d6f225c5ef2626b98169e/views/index.pug#L56 which corresponds to this: https://github.com/iquidus/explorer/blob/9692ab958a08893ea40d6f225c5ef2626b98169e/app.js#L147-L173

So we see in that app.js that /ext/getlasttxsajax/:min has the "min" variable which we've hardcoded in the view to be "0" So /ext/getlasttxsajax/0 ends up passing "0" to the following call here: https://github.com/iquidus/explorer/blob/9692ab958a08893ea40d6f225c5ef2626b98169e/lib/database.js#L374-L384

Here though is where your issue lies. We're searching for records that have a "TOTAL" amount that is greater-than-or-equal to "0". I would try changing this to something ridiculously small like ".0000001" in your views/index.pug file on line 56. That should give you the output you're looking to which hides the "0" transactions. Granted, right this moment, I can't think of any ill-effects this will have, but there may be some (hides a false-positive being the worst case scenario).

You can test it by just hitting /ext/getlasttxsajax/.0000001 and seeing if you get any outputs that have 0's in it.

uaktags avatar Aug 31 '20 21:08 uaktags

Sorry guys, I've been swamped with work that I haven't been too active.

That table is referencing /ext/getlasttxesajax/0 from here: https://github.com/iquidus/explorer/blob/9692ab958a08893ea40d6f225c5ef2626b98169e/views/index.pug#L56

which corresponds to this: https://github.com/iquidus/explorer/blob/9692ab958a08893ea40d6f225c5ef2626b98169e/app.js#L147-L173

So we see in that app.js that /ext/getlasttxsajax/:min has the "min" variable which we've hardcoded in the view to be "0" So /ext/getlasttxsajax/0 ends up passing "0" to the following call here: https://github.com/iquidus/explorer/blob/9692ab958a08893ea40d6f225c5ef2626b98169e/lib/database.js#L374-L384

Here though is where your issue lies. We're searching for records that have a "TOTAL" amount that is greater-than-or-equal to "0". I would try changing this to something ridiculously small like ".0000001" in your views/index.pug file on line 56. That should give you the output you're looking to which hides the "0" transactions. Granted, right this moment, I can't think of any ill-effects this will have, but there may be some (hides a false-positive being the worst case scenario).

You can test it by just hitting /ext/getlasttxsajax/.0000001 and seeing if you get any outputs that have 0's in it.

I have changed line 56 in views/index.pug to ajax: '/ext/getlasttxsajax/0.00000001', which has worked as you can see below:

image

explorer.idealcash.io Thanks a lot for helping with this @uaktags

FrediDealCash avatar Sep 01 '20 07:09 FrediDealCash

It works for me too, thank you!

B1ackt34 avatar Oct 24 '20 16:10 B1ackt34

We may want this to go down as a user-setting to hide such transactions. As an overall explorer, we'd want that because it's part of the blockchain that we're "exploring". However, as you guys can tell, it provides no realworld benefit.

uaktags avatar Oct 24 '20 19:10 uaktags

been struggling with this one for a bit and finally stumbled across this. Thanks @uaktags for spending the time on this.

rubber-duckie-au avatar May 21 '21 12:05 rubber-duckie-au