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: Go to select token when clicking disabled input #2876

Merged
merged 3 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const AmountCard = ({
{label != null && <Text style={[styles.label, !isEmptyString(error) && styles.labelError]}>{label}</Text>}

jorbuedo marked this conversation as resolved.
Show resolved Hide resolved
<View style={styles.content}>
<Pressable style={styles.amountWrapper} onPress={focusInput}>
<Pressable style={styles.amountWrapper} onPress={focusInput} {...(noTokenSelected && {onPress: navigateTo})}>
<TextInput
keyboardType="numeric"
autoComplete="off"
Expand All @@ -77,13 +77,14 @@ export const AmountCard = ({
selectTextOnFocus
onFocus={() => setIsFocused(true)}
onBlur={() => setIsFocused(false)}
{...(noTokenSelected && {onPressIn: navigateTo})}
/>
</Pressable>

<Spacer width={7} />

<View style={styles.rightSection}>
<TouchableOpacity onPress={() => navigateTo?.()}>
<TouchableOpacity onPress={navigateTo}>
<View style={styles.sectionContainer}>
<Boundary loading={{fallback: <TokenIconPlaceholder />}} error={{fallback}}>
{noTokenSelected ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,12 +325,14 @@ const swapFormReducer = (state: SwapFormState, action: SwapFormAction) => {
switch (action.type) {
case SwapFormActionType.SellTouched:
draft.sellQuantity.isTouched = true
draft.sellQuantity.displayValue = ''
jorbuedo marked this conversation as resolved.
Show resolved Hide resolved
draft.sellQuantity.error = undefined

break

case SwapFormActionType.BuyTouched:
draft.buyQuantity.isTouched = true
draft.buyQuantity.displayValue = ''
draft.buyQuantity.error = undefined

break
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@
"defaultMessage": "!!!Select token",
"file": "src/features/Swap/common/AmountCard/AmountCard.tsx",
"start": {
"line": 128,
"line": 129,
"column": 15,
"index": 4086
"index": 4188
},
"end": {
"line": 131,
"line": 132,
"column": 3,
"index": 4169
"index": 4271
}
},
{
"id": "swap.swapScreen.currentBalance",
"defaultMessage": "!!!Current Balance",
"file": "src/features/Swap/common/AmountCard/AmountCard.tsx",
"start": {
"line": 132,
"line": 133,
"column": 18,
"index": 4189
"index": 4291
},
"end": {
"line": 135,
"line": 136,
"column": 3,
"index": 4278
"index": 4380
}
}
]
Loading