Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Fix for eth/xdai balance symbol issue #2378

Merged
merged 2 commits into from
Feb 3, 2022
Merged

Conversation

nenadV91
Copy link
Contributor

@nenadV91 nenadV91 commented Feb 2, 2022

Summary

Fixes #2369

@nenadV91 nenadV91 requested review from a team February 2, 2022 16:21
@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2022

  • 🔭 GP Swap: CoW Protocol v2 Swap UI

Copy link
Contributor

@alfetopito alfetopito left a comment

Choose a reason for hiding this comment

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

I was trying to understand why it works on the header.
Well, that's because it's a cheat and it doesn't depend on the balance instance

const nativeToken = chainId && (CHAIN_CURRENCY_LABELS[chainId] || 'ETH')

@@ -411,7 +411,7 @@ export default function InvestOption({ claim, optionIndex, openModal, closeModal
<span>
<b>Balance:</b>
<i title={balance && `${formatMax(balance, balance.currency.decimals)} ${balance.currency.symbol}`}>
Copy link
Contributor

Choose a reason for hiding this comment

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

why the title and the value displayed use different var?
TITLE => balance.currency.decimals
VALUE => currencyAmount?.currency?.symbol

Copy link
Contributor

Choose a reason for hiding this comment

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

Ahhh good catch! Also need to update the title!

Copy link

@elena-zh elena-zh left a comment

Choose a reason for hiding this comment

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

LGTM

@nenadV91 nenadV91 merged commit 3dd6b62 into release/1.10 Feb 3, 2022
@alfetopito alfetopito deleted the 2369-eth-xdai-issue-fix branch February 3, 2022 17:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants