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(ui-ux): fix selection of whitelisted address that redirects to edit address #4040

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@ export function AddressBookScreen({ route, navigation }: Props): JSX.Element {
: addressDetail.address,
);
}
} else {
onDFIAddressClick();
}
};

Expand Down Expand Up @@ -340,9 +342,7 @@ export function AddressBookScreen({ route, navigation }: Props): JSX.Element {
]}
testID={`address_row_${index}_${testIDSuffix}`}
disabled={isDisabledToSelect}
onPress={async () => {
onChangeAddress(item);
}}
onPress={async () => onChangeAddress(item)}
>
<View
style={tailwind("flex flex-row items-center flex-grow", {
Expand Down Expand Up @@ -380,14 +380,7 @@ export function AddressBookScreen({ route, navigation }: Props): JSX.Element {
<View style={tailwind("flex flex-row items-center flex-auto")}>
<View style={tailwind("flex flex-auto mr-1")}>
{item.label !== "" && (
<TouchableOpacity
activeOpacity={0.7}
onPress={onDFIAddressClick}
style={tailwind("flex flex-row items-center")}
disabled={
activeButtonGroup === ButtonGroupTabKey.YourAddress
}
>
<>
<ThemedTextV2
style={tailwind("font-semibold-v2 text-sm min-w-0")}
Comment on lines +383 to 385
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<>
<ThemedTextV2
style={tailwind("font-semibold-v2 text-sm min-w-0")}
<View style={tailwind("flex flex-auto mr-1")}>
<ThemedTextV2
style={tailwind("font-semibold-v2 text-sm min-w-0")}

testID={`address_row_label_${index}_${testIDSuffix}`}
Expand All @@ -413,7 +406,7 @@ export function AddressBookScreen({ route, navigation }: Props): JSX.Element {
</Text>
</LinearGradient>
)}
</TouchableOpacity>
</>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
</>
</View>

)}
{/* for DFI address */}
<YourAddressLink
Expand All @@ -423,7 +416,7 @@ export function AddressBookScreen({ route, navigation }: Props): JSX.Element {
displayIcon={
activeButtonGroup === ButtonGroupTabKey.YourAddress
}
onClick={onDFIAddressClick}
onClick={async () => onChangeAddress(item)}
/>
{/* for EVM address */}
{activeButtonGroup === ButtonGroupTabKey.YourAddress && (
Expand All @@ -442,19 +435,13 @@ export function AddressBookScreen({ route, navigation }: Props): JSX.Element {
</View>
{!enableAddressSelect &&
activeButtonGroup === ButtonGroupTabKey.Whitelisted && (
<TouchableOpacity
activeOpacity={0.7}
onPress={onDFIAddressClick}
style={tailwind("flex flex-row items-center")}
>
<ThemedIcon
dark={tailwind("text-mono-dark-v2-700")}
light={tailwind("text-mono-light-v2-700")}
iconType="Feather"
name="chevron-right"
size={18}
/>
</TouchableOpacity>
<ThemedIcon
dark={tailwind("text-mono-dark-v2-700")}
light={tailwind("text-mono-light-v2-700")}
iconType="Feather"
name="chevron-right"
size={18}
/>
)}
</View>
</View>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.