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

feat(TokenEnterAmount): add new component to Swap flow #6247

Open
wants to merge 124 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
e5ab0a5
add new TokenEnterAmount component
sviderock Nov 18, 2024
2fbc1b2
fix exports
sviderock Nov 18, 2024
b12d50f
Merge branch 'main' into slava/add-new-enter-amount-component
sviderock Nov 18, 2024
8af7b8d
Add reusable useEnterAmount hook
sviderock Nov 18, 2024
44c0aab
remove unused code
sviderock Nov 18, 2024
1aa17d6
change flow on send
sviderock Nov 19, 2024
4ed89fc
fix tests
sviderock Nov 19, 2024
d0c7099
fix jumpstart
sviderock Nov 19, 2024
98d6552
change earn flow
sviderock Nov 19, 2024
b7e5107
remove unnecessary changes
sviderock Nov 19, 2024
6ca6f92
Merge branch 'main' into slava/add-new-enter-amount-component
sviderock Nov 19, 2024
f2185bc
Merge branch 'slava/add-new-enter-amount-component' into slava/add-en…
sviderock Nov 19, 2024
8762401
Merge branch 'slava/add-enter-amount-hook' into slava/change-send-flow
sviderock Nov 19, 2024
98938bc
fix knip
sviderock Nov 19, 2024
5a3f776
uncomment some tests
sviderock Nov 19, 2024
9360626
fixes
sviderock Nov 19, 2024
f322e23
Merge branch 'slava/change-send-flow' into slava/change-earn-flow
sviderock Nov 19, 2024
a54d71f
wip: change swap flow
sviderock Nov 19, 2024
b3f3c67
add tests
sviderock Nov 20, 2024
8ce68a4
clear up console logs
sviderock Nov 20, 2024
c2773fa
Merge branch 'slava/add-new-enter-amount-component' into slava/add-en…
sviderock Nov 20, 2024
37455cb
WIP: tests for the hook
sviderock Nov 20, 2024
8357b18
reformat groupNumber, finish number formatting tests
sviderock Nov 21, 2024
f5db952
add useEnterAmount initial tests
sviderock Nov 21, 2024
130b620
finish tests
sviderock Nov 21, 2024
10fb5bd
revert unnecessary change
sviderock Nov 21, 2024
112e5f9
Merge branch 'main' into slava/add-new-enter-amount-component
sviderock Nov 21, 2024
bce9c2b
Merge branch 'slava/add-new-enter-amount-component' into slava/add-en…
sviderock Nov 21, 2024
7048f8e
Merge branch 'slava/add-enter-amount-hook' into slava/change-send-flow
sviderock Nov 21, 2024
a08f3a9
format input values
sviderock Nov 22, 2024
22f4a44
fix tests
sviderock Nov 22, 2024
78218f6
fix zero values for readable amounts
sviderock Nov 22, 2024
cea53aa
add comments
sviderock Nov 22, 2024
060a81a
Merge branch 'slava/add-enter-amount-hook' into slava/change-send-flow
sviderock Nov 22, 2024
8d80b3d
add comment
sviderock Nov 22, 2024
f9b5e31
unskip test that checks logic when fiat prices unavailable
sviderock Nov 22, 2024
3db7a64
Merge branch 'slava/change-send-flow' into slava/change-earn-flow
sviderock Nov 22, 2024
621490d
Add ability to define available balance in TokenEnterAmount
sviderock Nov 22, 2024
c7a5951
fix tests
sviderock Nov 22, 2024
9b2a578
remove comments
sviderock Nov 22, 2024
c150c32
Merge branch 'slava/change-earn-flow' into slava/change-swap-flow
sviderock Nov 22, 2024
ad7f467
WIP: swap changes
sviderock Nov 22, 2024
0d64a5b
fix as per the review
sviderock Nov 22, 2024
2031bbc
fix as per the review comments
sviderock Nov 25, 2024
d7b5f0a
Merge branch 'main' into slava/add-new-enter-amount-component
sviderock Nov 25, 2024
6d738e4
Merge branch 'slava/add-new-enter-amount-component' into slava/add-en…
sviderock Nov 25, 2024
4c9ed39
remove refs and their handlers outside of the component
sviderock Nov 25, 2024
e1dbbec
refactor tests related to amount formatting
sviderock Nov 25, 2024
e9fc844
rename readabale to display
sviderock Nov 25, 2024
ec1f0a8
change variables names
sviderock Nov 25, 2024
96bc9b3
Merge branch 'slava/add-enter-amount-hook' into slava/change-send-flow
sviderock Nov 25, 2024
2c6f88b
fix tests after changes to hook
sviderock Nov 26, 2024
1a0c2bc
Merge branch 'main' into slava/add-new-enter-amount-component
sviderock Nov 26, 2024
6921dc5
Merge branch 'slava/add-new-enter-amount-component' into slava/add-en…
sviderock Nov 26, 2024
bcb4c6f
Merge branch 'slava/add-enter-amount-hook' into slava/change-send-flow
sviderock Nov 26, 2024
5d85bbd
remove unused callback
sviderock Nov 26, 2024
da1652b
change derived to processedAmounts
sviderock Nov 26, 2024
f57fac6
rename readable to displayAmount
sviderock Nov 26, 2024
39c6766
remove unnecessary hooks and mocks
sviderock Nov 26, 2024
cdd8396
fix tests as per review
sviderock Nov 26, 2024
6bb7c89
fix tests
sviderock Nov 26, 2024
1f40e7c
fix test
sviderock Nov 26, 2024
5cec1fb
Merge branch 'slava/add-enter-amount-hook' into slava/change-send-flow
sviderock Nov 26, 2024
b9f21de
fix as per the comments, adjust to "max" button
sviderock Nov 26, 2024
3858035
Merge branch 'main' into slava/change-send-flow
sviderock Nov 26, 2024
4eb45ba
unskip "max" tests
sviderock Nov 26, 2024
639e612
replace props.children check with .toHaveTextContent() in tests
sviderock Nov 26, 2024
080de6d
fix lint
sviderock Nov 27, 2024
27f8458
merge send into earn
sviderock Nov 27, 2024
8e06da5
Merge branch 'slava/change-earn-flow' into slava/change-swap-flow
sviderock Nov 27, 2024
3b00fec
wip
sviderock Nov 27, 2024
bbd01b0
WIP
sviderock Nov 27, 2024
e0de08b
add spacing for title
sviderock Nov 27, 2024
9e54474
fix title styles
sviderock Nov 27, 2024
35100c4
Merge branch 'slava/change-earn-flow' into slava/change-swap-flow
sviderock Nov 27, 2024
80b919e
commit before removing confirmingSwap
sviderock Nov 27, 2024
54aae6e
get swap properly working, refactor A LOT
sviderock Nov 27, 2024
289d9e7
Merge branch 'slava/change-send-flow' into slava/change-earn-flow
sviderock Nov 27, 2024
44597bb
Merge branch 'slava/change-earn-flow' into slava/change-swap-flow
sviderock Nov 27, 2024
fe52e47
remove unused component
sviderock Nov 27, 2024
7234e80
remove more unused code and accidental development quirk
sviderock Nov 27, 2024
9e07831
fix refetch not calling sometimes, remove redundant useEffects
sviderock Nov 27, 2024
5825753
rename const to function
sviderock Nov 27, 2024
8001e05
fix percentages
sviderock Nov 28, 2024
5357212
Merge branch 'slava/change-send-flow' into slava/change-earn-flow
sviderock Nov 28, 2024
9c5c31d
Merge branch 'main' into slava/change-earn-flow
sviderock Dec 9, 2024
3f37e64
adjust percentage management and timing of showing some warnings
sviderock Dec 10, 2024
8c500b7
more fixes
sviderock Dec 10, 2024
5822b22
Merge branch 'main' into slava/change-earn-flow
sviderock Dec 10, 2024
6a2b347
Merge branch 'slava/change-earn-flow' into slava/change-swap-flow
sviderock Dec 10, 2024
3463640
fix percentage
sviderock Dec 10, 2024
97e0a1a
fix as per review
sviderock Dec 11, 2024
08b540a
Merge branch 'main' into slava/change-earn-flow
sviderock Dec 11, 2024
574ba00
add comments
sviderock Dec 11, 2024
a1e834c
remove unused maxPressed
sviderock Dec 11, 2024
0fde6a6
remove unnecessary balanceInInputToken variable
sviderock Dec 16, 2024
5dd36f4
improve memoization of bignum
sviderock Dec 16, 2024
e576d26
remove unnecessary input change
sviderock Dec 16, 2024
1dbd98e
add explanation comment to balance management
sviderock Dec 16, 2024
95cf72b
remove available section from withdraw details
sviderock Dec 16, 2024
7cdaac1
Merge branch 'main' into slava/change-earn-flow
sviderock Dec 16, 2024
fd40bc6
Merge branch 'slava/change-earn-flow' into slava/change-swap-flow
sviderock Dec 16, 2024
98ccb17
Merge branch 'main' into slava/change-swap-flow
sviderock Dec 16, 2024
ce11582
WIP adjust tests to new swap flow
sviderock Dec 16, 2024
39664fe
finalize tests
sviderock Dec 19, 2024
1fa2209
revert accidental logger commented
sviderock Dec 19, 2024
52a37a0
fix knip and linter
sviderock Dec 19, 2024
57e4e01
Move new swap screen to a separate component
sviderock Dec 19, 2024
aa79667
hide SwapScreenV2 behind the feature flag
sviderock Dec 19, 2024
76b4dba
reduce unnecessary changes
sviderock Dec 19, 2024
8c6c71a
Merge branch 'main' into slava/change-swap-flow
sviderock Dec 19, 2024
8599b18
try to reduce unnecessary changes even more
sviderock Dec 19, 2024
c3ba81b
rename component
sviderock Dec 19, 2024
930a919
fix export default
sviderock Dec 19, 2024
5e780d9
more fixes
sviderock Dec 19, 2024
98c06f9
Merge branch 'main' into slava/change-swap-flow
sviderock Dec 23, 2024
726153d
multiple fixes as per review
sviderock Jan 2, 2025
9c6886d
Merge branch 'main' into slava/change-swap-flow
sviderock Jan 2, 2025
27a7f58
fix incomplete list of deps for processedAmounts memo
sviderock Jan 2, 2025
67c69ba
more fixes as per review
sviderock Jan 2, 2025
68319ed
fix tests affected by moving token description to a separate translat…
sviderock Jan 2, 2025
bd8999c
more fixes as per review
sviderock Jan 2, 2025
e6b5971
fix typo
sviderock Jan 2, 2025
7caeb77
change remaining "on" handlers with "handle"
sviderock Jan 2, 2025
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
6 changes: 4 additions & 2 deletions locales/base/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -2822,6 +2822,8 @@
"tokenEnterAmount": {
"availableBalance": "Available: <0></0>",
"selectToken": "Select token",
"fiatPriceUnavailable": "Price unavailable"
}
"fiatPriceUnavailable": "Price unavailable",
"tokenDescription": "{{tokenName}} on {{tokenNetwork}}"
},
"on": "on"
Copy link
Contributor

Choose a reason for hiding this comment

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

i guess the translation of the word "on" is highly dependent on context. perhaps we can use some template to provide it? kind of like this:

"tokenDescription": "{{tokenName}} on {{tokenNetwork}}"

and, with that, shall we include this item in the tokenEnterAmount group above?

Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to keep the "on"?

}
8 changes: 5 additions & 3 deletions src/components/TokenEnterAmount.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,9 @@ describe('TokenEnterAmount', () => {
</Provider>
)

expect(getByTestId('TokenEnterAmount/TokenName')).toHaveTextContent('CELO on Celo Alfajores')
expect(getByTestId('TokenEnterAmount/TokenName')).toHaveTextContent(
'tokenEnterAmount.tokenDescription, {"tokenName":"CELO","tokenNetwork":"Celo Alfajores"}'
)
expect(getByTestId('TokenEnterAmount/SwitchTokens')).toBeTruthy()
expect(getByTestId('TokenEnterAmount/TokenSelect')).toBeTruthy()
expect(getByTestId('TokenEnterAmount/TokenBalance')).toHaveTextContent(
Expand Down Expand Up @@ -403,17 +405,17 @@ describe('TokenEnterAmount', () => {
<Provider store={store}>
<TokenEnterAmount
{...defaultProps}
editable={false}
inputValue="1234.5678"
tokenAmount="1,234.5678"
localAmount="$123.57"
amountType="token"
onInputChange={undefined}
/>
</Provider>
)
const input = getByTestId('TokenEnterAmount/TokenAmountInput')

expect(input.props.editable).toBe(false)
expect(input).toBeDisabled()
})

it('shows unavailable fiat price message when priceUsd is undefined', () => {
Expand Down
227 changes: 138 additions & 89 deletions src/components/TokenEnterAmount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
View,
} from 'react-native'
import { getNumberFormatSettings } from 'react-native-localize'
import SkeletonPlaceholder from 'react-native-skeleton-placeholder'
import TextInput from 'src/components/TextInput'
import TokenDisplay from 'src/components/TokenDisplay'
import TokenIcon, { IconSize } from 'src/components/TokenIcon'
Expand Down Expand Up @@ -105,12 +106,10 @@ export function getDisplayLocalAmount(
* variables and handlers that manage "enter amount" functionality, including rate calculations.
*/
export function useEnterAmount(props: {
token: TokenBalance
token: TokenBalance | undefined
inputRef: React.RefObject<RNTextInput>
onHandleAmountInputChange?(amount: string): void
}) {
const { decimalSeparator } = getNumberFormatSettings()

/**
* This field is formatted for processing purpose. It is a lot easier to process a number formatted
* in a single format, rather than writing different logic for various combinations of decimal
Expand Down Expand Up @@ -139,6 +138,15 @@ export function useEnterAmount(props: {
* - `local.displayAmount` -> `localDisplayAmount`
*/
const processedAmounts = useMemo(() => {
const { decimalSeparator } = getNumberFormatSettings()

if (!props.token) {
Copy link
Contributor

@bakoushin bakoushin Dec 23, 2024

Choose a reason for hiding this comment

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

is it okay that this variable is not listed in the dependecies list?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bakoushin accidentally missed it! Will add it to the list.

P.S. Sometimes I really wish we had eslint rule for this 😄

return {
token: { bignum: null, displayAmount: '' },
local: { bignum: null, displayAmount: '' },
}
}

if (amountType === 'token') {
const parsedTokenAmount = amount === '' ? null : parseInputAmount(amount)

Expand Down Expand Up @@ -201,9 +209,11 @@ export function useEnterAmount(props: {
displayAmount: getDisplayLocalAmount(parsedLocalAmount, localCurrencySymbol),
},
}
}, [amount, amountType, localCurrencySymbol])
}, [amount, amountType, localCurrencySymbol, usdToLocalRate, props.token])

function handleToggleAmountType() {
if (!props.token) return

const newAmountType = amountType === 'local' ? 'token' : 'local'
setAmountType(newAmountType)
setAmount(
Expand All @@ -218,7 +228,7 @@ export function useEnterAmount(props: {
value = unformatNumberForProcessing(value)
value = value.startsWith('.') ? `0${value}` : value

if (!value) {
if (!value || !props.token) {
setAmount('')
props.onHandleAmountInputChange?.('')
return
Expand All @@ -231,17 +241,30 @@ export function useEnterAmount(props: {
`^(?:\\d+[.]?\\d{0,${props.token.decimals}}|[.]\\d{0,${props.token.decimals}}|[.])$`
)

if (
(amountType === 'token' && value.match(tokenAmountRegex)) ||
(amountType === 'local' && value.match(localAmountRegex))
) {
const isValidTokenAmount = amountType === 'token' && value.match(tokenAmountRegex)
const isValidLocalAmount = amountType === 'local' && value.match(localAmountRegex)
if (isValidTokenAmount || isValidLocalAmount) {
setAmount(value)
props.onHandleAmountInputChange?.(value)
return
}
}

function replaceAmount(value: string) {
if (!props.token) return

if (value === '') {
setAmount('')
return
}

const rawValue = unformatNumberForProcessing(value)
const roundedAmount = new BigNumber(rawValue).decimalPlaces(props.token?.decimals).toString()
setAmount(roundedAmount)
}

function handleSelectPercentageAmount(percentage: number) {
if (!props.token) return
if (percentage <= 0 || percentage > 1) return

const percentageAmount = props.token.balance.multipliedBy(percentage)
Expand All @@ -265,7 +288,7 @@ export function useEnterAmount(props: {
amount,
amountType,
processedAmounts,
replaceAmount: setAmount,
replaceAmount,
handleToggleAmountType,
handleAmountInputChange,
handleSelectPercentageAmount,
Expand All @@ -281,30 +304,31 @@ export default function TokenEnterAmount({
inputRef,
inputStyle,
autoFocus,
editable = true,
testID,
onInputChange,
toggleAmountType,
onOpenTokenPicker,
loading,
}: {
token?: TokenBalance
inputValue: string
tokenAmount: string
localAmount: string
amountType: AmountEnteredIn
inputRef: React.MutableRefObject<RNTextInput | null>
loading?: boolean
inputStyle?: StyleProp<TextStyle>
autoFocus?: boolean
editable?: boolean
testID?: string
onInputChange(value: string): void
onInputChange?(value: string): void
toggleAmountType?(): void
onOpenTokenPicker?(): void
}) {
const { t } = useTranslation()
// the startPosition and inputRef variables exist to ensure TextInput
// displays the start of the value for long values on Android
// https://github.com/facebook/react-native/issues/14845
/**
* startPosition and inputRef variables exist to ensure TextInput displays the start of the value
* for long values on Android: https://github.com/facebook/react-native/issues/14845
*/
const [startPosition, setStartPosition] = useState<number | undefined>(0)
// this should never be null, just adding a default to make TS happy
const localCurrencySymbol = useSelector(getLocalCurrencySymbol) ?? LocalCurrencySymbol.USD
Expand Down Expand Up @@ -359,7 +383,10 @@ export default function TokenEnterAmount({

<View style={styles.tokenNameAndAvailable}>
<Text style={styles.tokenName} testID={`${testID}/TokenName`}>
{token.symbol} on {NETWORK_NAMES[token.networkId]}
{t('tokenEnterAmount.tokenDescription', {
tokenName: token.symbol,
tokenNetwork: NETWORK_NAMES[token.networkId],
})}
</Text>
<Text style={styles.tokenBalance} testID={`${testID}/TokenBalance`}>
<Trans i18nKey="tokenEnterAmount.availableBalance">
Expand All @@ -381,81 +408,95 @@ export default function TokenEnterAmount({
</View>
</Touchable>
{token && (
<View
style={[
styles.rowContainer,
{ borderTopLeftRadius: 0, borderTopRightRadius: 0, borderTopWidth: 0 },
]}
>
<TextInput
forwardedRef={inputRef}
onChangeText={(value) => {
handleSetStartPosition(undefined)
onInputChange(value)
}}
value={formattedInputValue}
placeholderTextColor={Colors.gray3}
placeholder={amountType === 'token' ? placeholder.token : placeholder.local}
keyboardType="decimal-pad"
// Work around for RN issue with Samsung keyboards
// https://github.com/facebook/react-native/issues/22005
autoCapitalize="words"
autoFocus={autoFocus}
// unset lineHeight to allow ellipsis on long inputs on iOS. For
// android, ellipses doesn't work and unsetting line height causes
// height changes when amount is entered
inputStyle={[
styles.primaryAmountText,
inputStyle,
Platform.select({ ios: { lineHeight: undefined } }),
<View>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This addition/removal is purely a result of adding extra View wrapper around the input as it is needed for the new loading check below. The actual TextField props are unchanged.

<View
style={[
styles.rowContainer,
{ borderTopLeftRadius: 0, borderTopRightRadius: 0, borderTopWidth: 0 },
]}
onBlur={() => {
handleSetStartPosition(0)
}}
onFocus={() => {
const withCurrency = amountType === 'local' ? 1 : 0
handleSetStartPosition((inputValue?.length ?? 0) + withCurrency)
}}
onSelectionChange={() => {
handleSetStartPosition(undefined)
}}
selection={
Platform.OS === 'android' && typeof startPosition === 'number'
? { start: startPosition }
: undefined
}
showClearButton={false}
editable={editable}
testID={`${testID}/TokenAmountInput`}
/>

{token.priceUsd ? (
<>
{toggleAmountType && (
<Touchable
onPress={toggleAmountType}
style={styles.swapArrowContainer}
testID={`${testID}/SwitchTokens`}
hitSlop={variables.iconHitslop}
>
<TextInput
forwardedRef={inputRef}
onChangeText={(value) => {
handleSetStartPosition(undefined)
onInputChange?.(value)
}}
value={formattedInputValue}
placeholderTextColor={Colors.gray3}
placeholder={amountType === 'token' ? placeholder.token : placeholder.local}
keyboardType="decimal-pad"
// Work around for RN issue with Samsung keyboards
// https://github.com/facebook/react-native/issues/22005
autoCapitalize="words"
autoFocus={autoFocus}
// unset lineHeight to allow ellipsis on long inputs on iOS. For
// android, ellipses doesn't work and unsetting line height causes
// height changes when amount is entered
inputStyle={[
styles.primaryAmountText,
inputStyle,
Platform.select({ ios: { lineHeight: undefined } }),
]}
onBlur={() => {
handleSetStartPosition(0)
}}
onFocus={() => {
const withCurrency = amountType === 'local' ? 1 : 0
handleSetStartPosition((inputValue?.length ?? 0) + withCurrency)
}}
onSelectionChange={() => {
handleSetStartPosition(undefined)
}}
selection={
Platform.OS === 'android' && typeof startPosition === 'number'
? { start: startPosition }
: undefined
}
showClearButton={false}
editable={!!onInputChange}
testID={`${testID}/TokenAmountInput`}
/>

{token.priceUsd ? (
<>
{toggleAmountType && (
<Touchable
onPress={toggleAmountType}
style={styles.swapArrowContainer}
testID={`${testID}/SwitchTokens`}
hitSlop={variables.iconHitslop}
>
<SwapArrows color={Colors.gray3} size={24} />
</Touchable>
)}

<Text
numberOfLines={1}
style={[styles.secondaryAmountText, { flex: 0, textAlign: 'right' }]}
testID={`${testID}/ExchangeAmount`}
>
<SwapArrows color={Colors.gray3} size={24} />
</Touchable>
)}

<Text
numberOfLines={1}
style={[styles.secondaryAmountText, { flex: 0, textAlign: 'right' }]}
testID={`${testID}/ExchangeAmount`}
>
{amountType === 'token'
? `${APPROX_SYMBOL} ${localAmount ? localAmount : placeholder.local}`
: `${APPROX_SYMBOL} ${tokenAmount ? tokenAmount : placeholder.token}`}
{amountType === 'token'
? `${APPROX_SYMBOL} ${localAmount ? localAmount : placeholder.local}`
: `${APPROX_SYMBOL} ${tokenAmount ? tokenAmount : placeholder.token}`}
</Text>
</>
) : (
<Text style={styles.secondaryAmountText}>
{t('tokenEnterAmount.fiatPriceUnavailable')}
</Text>
</>
) : (
<Text style={styles.secondaryAmountText}>
{t('tokenEnterAmount.fiatPriceUnavailable')}
</Text>
)}
</View>

{loading && (
<View testID={`${testID}/Loader`} style={styles.loader}>
<SkeletonPlaceholder
borderRadius={100} // ensure rounded corners with font scaling
backgroundColor={Colors.gray2}
highlightColor={Colors.white}
>
<View style={{ height: '100%', width: '100%' }} />
</SkeletonPlaceholder>
</View>
)}
</View>
)}
Expand Down Expand Up @@ -511,4 +552,12 @@ const styles = StyleSheet.create({
swapArrowContainer: {
transform: [{ rotate: '90deg' }],
},
loader: {
padding: Spacing.Regular16,
position: 'absolute',
top: 0,
left: 0,
height: '100%',
width: '100%',
},
})
Loading
Loading