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(coinmarket): Fix address label not showing in dropdown #9539

Merged
merged 2 commits into from
Oct 5, 2023

Conversation

FreeWall
Copy link
Member

Fix address label not showing in dropdown.

Description

When user sets a label for any bitcoin or bitcoin-like receiving address, the label is then not showing in the exchange flow.

Related Issue

Resolve #9532

Screenshots:

image

@FreeWall FreeWall added the +Invity Related to Invity project label Sep 22, 2023
Comment on lines 92 to 94
const accountMetadata = useSelector(
state => account && selectLabelingDataForAccount(state, account.key),
);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const accountMetadata = useSelector(
state => account && selectLabelingDataForAccount(state, account.key),
);
const accountMetadata = useSelector(
state => selectLabelingDataForAccount(state, account?.key),
);

If this component can be rendered without account
I believe it would be better to modify selectLabelingDataForAccount so that it accepts undefined as a key and handle it inside the method instead of this conditional selector

Copy link
Contributor

Choose a reason for hiding this comment

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

Another option is to simply pass account?.key || ''

Copy link
Contributor

Choose a reason for hiding this comment

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

if you are about to make changes to selector, please consider changes in selectors in this branch #9130 so that I don't have to solve too many conflicts :D

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed by account?.key || '' as also used in other places

@tomasklim tomasklim merged commit c00fa1d into develop Oct 5, 2023
6 checks passed
@tomasklim tomasklim deleted the fix/coinmarket-address-label branch October 5, 2023 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
+Invity Related to Invity project
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Address label not showing in dropdown
5 participants