Skip to content

Commit

Permalink
Merge 8981289 into eba1880
Browse files Browse the repository at this point in the history
  • Loading branch information
thedoublejay authored Aug 7, 2021
2 parents eba1880 + 8981289 commit 4294354
Show file tree
Hide file tree
Showing 40 changed files with 668 additions and 185 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as React from 'react'
import { View } from 'react-native'
import Spinner from 'react-native-loading-spinner-overlay'
import { tailwind } from '../../tailwind'
import { translate } from '../../translations'
import { tailwind } from '../tailwind'
import { translate } from '../translations'

export default function LoadingScreen (props: { message?: string }): JSX.Element {
const { message } = props
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ import { Logging } from '../../../../api'
import { Text, TextInput, View } from '../../../../components'
import { Button } from '../../../../components/Button'
import { getTokenIcon } from '../../../../components/icons/tokens/_index'
import LoadingScreen from '../../../../components/LoadingScreen'
import { SectionTitle } from '../../../../components/SectionTitle'
import { AmountButtonTypes, SetAmountButton } from '../../../../components/SetAmountButton'
import { useTokensAPI } from '../../../../hooks/wallet/TokensAPI'
import { RootState } from '../../../../store'
import { hasTxQueued, transactionQueue } from '../../../../store/transaction'
import { tailwind } from '../../../../tailwind'
import { translate } from '../../../../translations'
import LoadingScreen from '../../../LoadingNavigator/LoadingScreen'
import { BalanceParamList } from './BalancesNavigator'

export type ConversionMode = 'utxosToAccount' | 'accountToUtxos'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@ export function TokenDetailScreen ({ route, navigation }: Props): JSX.Element {
</Text>
<NumberFormat
value={token.amount} decimalScale={8} thousandSeparator displayType='text' suffix={` ${token.symbol}`}
renderText={(value) => <Text style={tailwind('text-2xl font-bold')}>{value}</Text>}
renderText={(value) => (
<Text
testID='token_detail_amount'
style={tailwind('text-2xl font-bold')}
>{value}
</Text>
)}
/>
</View>
<SectionTitle
Expand Down

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

2 changes: 1 addition & 1 deletion app/screens/AppNavigator/screens/Dex/DexAddLiquidity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import NumberFormat from 'react-number-format'
import { Text, TextInput, View } from '../../../../components'
import { Button } from '../../../../components/Button'
import { getTokenIcon } from '../../../../components/icons/tokens/_index'
import LoadingScreen from '../../../../components/LoadingScreen'
import { SectionTitle } from '../../../../components/SectionTitle'
import { AmountButtonTypes, SetAmountButton } from '../../../../components/SetAmountButton'
import { useTokensAPI } from '../../../../hooks/wallet/TokensAPI'
import { tailwind } from '../../../../tailwind'
import { translate } from '../../../../translations'
import LoadingScreen from '../../../LoadingNavigator/LoadingScreen'
import { DexParamList } from './DexNavigator'

type Props = StackScreenProps<DexParamList, 'AddLiquidity'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { Logging } from '../../../../../api'
import { Text, TextInput } from '../../../../../components'
import { Button } from '../../../../../components/Button'
import { getTokenIcon } from '../../../../../components/icons/tokens/_index'
import LoadingScreen from '../../../../../components/LoadingScreen'
import { SectionTitle } from '../../../../../components/SectionTitle'
import { AmountButtonTypes, SetAmountButton } from '../../../../../components/SetAmountButton'
import { useWallet } from '../../../../../contexts/WalletContext'
Expand All @@ -22,7 +23,6 @@ import { RootState } from '../../../../../store'
import { hasTxQueued, transactionQueue } from '../../../../../store/transaction_queue'
import { tailwind } from '../../../../../tailwind'
import { translate } from '../../../../../translations'
import LoadingScreen from '../../../../LoadingNavigator/LoadingScreen'
import { DexParamList } from '../DexNavigator'

interface DerivedTokenState {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { fireEvent, render } from "@testing-library/react-native"
import * as React from 'react'
import { Linking } from 'react-native'
import { AboutScreen } from "./AboutScreen";

it('<AboutScreen /> should match snapshot', async () => {
const tree = render(<AboutScreen />)
expect(tree.toJSON()).toMatchSnapshot()
const privacyPolicy = await tree.findByTestId('privacy_policy_button')
fireEvent.press(privacyPolicy)
expect(Linking.canOpenURL).toBeCalled()
})

Loading

0 comments on commit 4294354

Please sign in to comment.