Fix error that occurs when attempting to display transaction value for a transaction with no value argument in the transaction data (in this case approve())
#15398
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: Issue reported by multiple users to support over the weekend
The issue: When users approve an asset and then go to the home screen for that asset (or the
activitytab on the home screen without clicking into the asset) they getBigNumbererror:https://user-images.githubusercontent.com/34557516/182171511-8f252132-b826-42a5-a982-dc3a1e8ef5ca.mp4
This issue appears to have been introduced here, since after this change a truthy value was passed to
useTokenDisplayhere, and soshouldCalculateTokenValuegets set to true here, and then we attempt to calculate thetokenAmounteven though the transaction data does not contain a_valuearg.The Fix:
modify the
shouldCalculateTokenValueconditional to only move on to calculating the amount if we are able to extract the_valuearg required to successful/safely calculate the amount.