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

fix: use tx hash instead of index in v3 api version #1727

Merged
merged 3 commits into from Apr 15, 2024

Conversation

yaboiishere
Copy link
Contributor

ref: #764

@yaboiishere yaboiishere self-assigned this Apr 11, 2024
@yaboiishere yaboiishere marked this pull request as ready for review April 12, 2024 07:02
state
|> Txs.fetch!(txi)
|> Map.put("tx_hash", Enc.encode(:tx_hash, Txs.txi_to_hash(state, txi)))
|> Map.delete("tx_index")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we're fetching the transaction twice (on fetch! and on txi_to_hash). Plus, I think hash is included already on the txs render function

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, you're correct, I've removed this. Also had to remove it from the tests since the function it was comming from was mocked to always return %{}, so i decided to return the test as it was

@sborrazas sborrazas merged commit e4e0f00 into master Apr 15, 2024
7 checks passed
@sborrazas sborrazas deleted the v3-use-tx-hash-instead-of-index branch April 15, 2024 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants