Skip to content

Commit

Permalink
ui fixes (#505)
Browse files Browse the repository at this point in the history
* ui fixes

* updated snapshot

* revert default mainnet on prod
  • Loading branch information
thedoublejay authored Aug 9, 2021
1 parent 8069b9b commit 5cf7aa1
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 15 deletions.
4 changes: 2 additions & 2 deletions app/__snapshots__/environment.test.ts.snap

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

4 changes: 2 additions & 2 deletions app/components/HeaderTitle.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect } from 'react'
import { View } from 'react-native'
import { Platform, View } from 'react-native'
import { useDispatch, useSelector } from 'react-redux'
import { Logging } from '../api'
import { useNetworkContext } from '../contexts/NetworkContext'
Expand Down Expand Up @@ -57,7 +57,7 @@ export function ConnectionStatus (): JSX.Element {

export function HeaderTitle ({ text, testID }: { text: string, testID?: string }): JSX.Element {
return (
<View style={tailwind('flex-col')}>
<View style={tailwind(`flex-col ${Platform.OS === 'ios' ? 'items-center' : ''}`)}>
<Text
testID={testID}
style={tailwind('font-semibold')}
Expand Down
4 changes: 2 additions & 2 deletions app/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ export const environments: Record<EnvironmentName, Environment> = {
name: EnvironmentName.Production,
debug: false,
networks: [
EnvironmentNetwork.MainNet,
EnvironmentNetwork.RemotePlayground,
EnvironmentNetwork.TestNet,
EnvironmentNetwork.RemotePlayground
EnvironmentNetwork.MainNet
]
},
Preview: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export function TokenDetailScreen ({ route, navigation }: Props): JSX.Element {
token.symbol === 'DFI' && (
<TokenActionRow
testID='convert_button'
title={`${translate('screens/TokenDetailScreen', 'Convert')} ${token.displaySymbol}`}
title={`${translate('screens/TokenDetailScreen', `Convert to ${token.id === '0_utxo' ? 'Token' : 'UTXO'}`)}`}
icon='swap-vert' onPress={() => {
const mode: ConversionMode = token.id === '0_utxo' ? 'utxosToAccount' : 'accountToUtxos'
navigation.navigate('Convert', { mode })
Expand Down

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

9 changes: 4 additions & 5 deletions app/screens/TransactionAuthorization.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { CTransactionSegWit } from '@defichain/jellyfish-transaction/dist'
import { WhaleWalletAccount } from '@defichain/whale-api-wallet'
import * as LocalAuthentication from 'expo-local-authentication'
import React, { Dispatch, useCallback, useEffect, useState } from 'react'
import { ActivityIndicator, Alert, Platform, SafeAreaView, TouchableOpacity } from 'react-native'
import { useDispatch, useSelector } from 'react-redux'
import { Logging } from '../api'
import { PasscodeAttemptCounter } from '../api/wallet'
import { BiometricProtectedPasscode } from '../api/wallet/biometric_protected_passcode'
import { Text, View } from '../components'
import { PinTextInput } from '../components/PinTextInput'
import { useEncryptedWalletUI, useWallet } from '../contexts/WalletContext'
Expand Down Expand Up @@ -41,7 +39,7 @@ export function TransactionAuthorization (): JSX.Element | null {
const encryptionUI = useEncryptedWalletUI()

// biometric related persistent storage API
const [isBiometric, setIsBiometric] = useState(false)
// const [isBiometric, setIsBiometric] = useState(false)

// store
const dispatch = useDispatch()
Expand Down Expand Up @@ -177,7 +175,8 @@ export function TransactionAuthorization (): JSX.Element | null {
emitEvent('IDLE')
}, [])

// setup biometric hook if enrolled
// Disable Biometric hook
/* // setup biometric hook if enrolled
useEffect(() => {
BiometricProtectedPasscode.isEnrolled()
.then(isEnrolled => setIsBiometric(isEnrolled))
Expand All @@ -196,7 +195,7 @@ export function TransactionAuthorization (): JSX.Element | null {
})
.catch(e => Logging.error(e)) // auto fallback to manual pin input
}
}, [status, isBiometric])
}, [status, isBiometric]) */

if (status === 'INIT') return null

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function OnboardingCarousel (): JSX.Element {
autoplayDelay={30}
autoplayLoop
autoplayLoopKeepAnimation
index={2}
index={0}
showPagination
data={slides}
paginationStyleItem={tailwind('h-2.5 w-2.5 mx-1.5')}
Expand Down

0 comments on commit 5cf7aa1

Please sign in to comment.