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: display hex-decoded currency in AMM transaction table #857

Merged
merged 5 commits into from
Nov 2, 2023

Conversation

mvadari
Copy link
Collaborator

@mvadari mvadari commented Oct 13, 2023

High Level Overview of Change

Update the AMM transaction table to use the Currency component to consolidate currency formatting logic

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Refactor (non-breaking change that only restructures code)
  • Tests (You added tests for code that already exists, or your new feature included in this PR)
  • Translation Updates

@mvadari mvadari requested a review from ckniffen October 13, 2023 16:26
Copy link
Collaborator

@ckniffen ckniffen left a comment

Choose a reason for hiding this comment

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

Can you add a test.

src/containers/shared/components/TxToken.tsx Outdated Show resolved Hide resolved
@ckniffen ckniffen marked this pull request as ready for review October 17, 2023 20:22
i18nKey={
type === 'Payment'
? 'token_for_transaction_swap'
: 'token_for_transaction'
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not really sure what token_for_transaction means - is there a more descriptive label that could be used?

const wrapper = createWrapper(withdrawMock)

expect(wrapper).toHaveText('\uE900 XRP and USD')
})
Copy link
Contributor

Choose a reason for hiding this comment

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

Should there be one more case for the for case instead of just the and case?

Copy link
Collaborator

Choose a reason for hiding this comment

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

There should be but I discovered that case is currently impossible to hit. I have asked internally for clarification of a case when this should occur. Currently it seems like additional parsing needs to be added to look at SendMax.

Copy link
Collaborator Author

@mvadari mvadari left a comment

Choose a reason for hiding this comment

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

I can't approve because this was originally my PR but ✅

Copy link
Contributor

@JST5000 JST5000 left a comment

Choose a reason for hiding this comment

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

LGTM

@ckniffen ckniffen merged commit 9857379 into staging Nov 2, 2023
4 checks passed
@ckniffen ckniffen deleted the fix-amm-table-currency branch November 2, 2023 18:49
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

4 participants