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

refactor: using transactions count from the token entry instead of the tokenInformation API #213

Merged
merged 6 commits into from
Aug 25, 2022

Conversation

andreabadesso
Copy link
Contributor

@andreabadesso andreabadesso commented Aug 15, 2022

Acceptance Criteria

  • We should use the new fetch token API from the explorer-service to retrieve the hathor token transactions count
  • We should use the transactions column from the token entry retrieved from the search to display the total number of transactions for a given token
  • If the fetch token API request fails, we should hide the information

Security Checklist

  • Make sure you do not include new dependencies in the project unless strictly necessary and do not include dev-dependencies as production ones. More dependencies increase the possibility of one of them being hijacked and affecting us.

@andreabadesso andreabadesso requested a review from r4mmer as a code owner August 15, 2022 18:47
@andreabadesso andreabadesso self-assigned this Aug 15, 2022
@andreabadesso andreabadesso changed the title refactor: calling the token api when token is hathor refactor: using transactions count from the token entry instead of the tokenInformation API Aug 17, 2022
@andreabadesso andreabadesso requested a review from tuliomir August 17, 2022 13:46
<p><b>Total number of transactions:</b> { helpers.renderValue(this.state.transactionsCount, true) }</p>
)}

{(this.state.tokensApiError || this.state.tokenBalanceInformationError) &&(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hides the failed request data and displays a single error message for both

pedroferreira1
pedroferreira1 previously approved these changes Aug 19, 2022
pedroferreira1
pedroferreira1 previously approved these changes Aug 19, 2022
)}

{(this.state.tokensApiError || this.state.tokenBalanceInformationError) &&(
<ErrorMessageWithIcon message='Error loading the complete token balance information. Please try again.' />
Copy link
Member

Choose a reason for hiding this comment

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

Should we add a "Reload" button to try again?

Copy link
Contributor Author

@andreabadesso andreabadesso Aug 24, 2022

Choose a reason for hiding this comment

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

We could, it would be specific for the hathor token though (so is this error message)

I would just suggest opening an issue for this instead of doing it in this PR so we can merge this and fix the bug in production

#214

@andreabadesso andreabadesso merged commit b94bf6f into dev Aug 25, 2022
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.

3 participants