Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[minor defect] Logos for "old hashes" are missing if hash gets updated #1915

Open
comountainclimber opened this issue Sep 26, 2019 · 3 comments
Labels
Bug Something isn't working Low An issue below normal priority

Comments

@comountainclimber
Copy link
Member

comountainclimber commented Sep 26, 2019

Because we perform a lookup based on script hash from the results returned from neoscan on the "history" page compared to the contents of neo-tokens repo, if a team changes its hash its logo will no longer be rendered in the transaction history panel for all of the previous transactions performed under that old script hash.

GOAL: modify the logic here https://github.com/CityOfZion/neon-wallet/blob/dev/app/util/findAndReturnTokenInfo.js such that logos are returned based on symbol rather than hash

@comountainclimber comountainclimber changed the title [minor defect] Our \ [minor defect] Logos for "old hashes" are missing if hash gets updated Sep 26, 2019
@comountainclimber comountainclimber added Low An issue below normal priority Bug Something isn't working labels Sep 26, 2019
@dauTT
Copy link
Contributor

dauTT commented Nov 6, 2019

@comountainclimber ,

The data in the transaction history panel is coming essentially from this neoscan call:

https://github.com/CityOfZion/neon-wallet/blob/dev/app/actions/transactionHistoryActions.js#L88

const endpoint = api.neoscan.getAPIEndpoint(net)
    const { data } = await axios.get(
      `${endpoint}/v1/get_address_abstracts/${address}/${page}`,
    )

    const parsedEntries = await parseAbstractData(data.entries, address, net)

and the output of the call looks as follow:

image

As you can see, the output contains only asset hashes. In order to implement your suggestion we will need to enrich the neoscan output with the asset's symbol. Do you agree? Or is there a work around to get the asset's symbol from the asset's hash?

@comountainclimber
Copy link
Member Author

@dauTT that would definitely make things substantially easier for us but I think another possible solution could be to store a list of deprecated hashes and their corresponding symbols in a json file that gets imported locally

@dauTT
Copy link
Contributor

dauTT commented Nov 19, 2019

Ok, got it.

For testing purposes, do you have a public address where this problem is showing up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Low An issue below normal priority
Projects
None yet
Development

No branches or pull requests

2 participants