Skip to content

Commit

Permalink
Merge pull request #7141 from bithyve/fix-issues
Browse files Browse the repository at this point in the history
Fix issues
  • Loading branch information
cakesoft-shashank authored May 13, 2024
2 parents a0138e6 + 68d9c34 commit 4c8c5b1
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 41 deletions.
21 changes: 9 additions & 12 deletions src/pages/FriendsAndFamily/AccountSelected.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
import React, { useMemo } from 'react'
import { View, Text, StyleSheet, TouchableOpacity } from 'react-native'
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'
import { RFValue } from 'react-native-responsive-fontsize'
import {
widthPercentageToDP as wp,
heightPercentageToDP as hp,
heightPercentageToDP as hp, widthPercentageToDP as wp
} from 'react-native-responsive-screen'
import { AccountType } from '../../bitcoin/utilities/Interface'
import Colors from '../../common/Colors'
import Fonts from '../../common/Fonts'
import { RFValue } from 'react-native-responsive-fontsize'
import FontAwesome from 'react-native-vector-icons/FontAwesome'
import useActiveAccountShells from '../../utils/hooks/state-selectors/accounts/UseActiveAccountShells'
import getAvatarForSubAccount from '../../utils/accounts/GetAvatarForSubAccountKind'
import DashedContainerSmall from './DashedContainerSmall'
import { useSelector } from 'react-redux'
import GiftCard from '../../assets/images/svgs/icon_gift.svg'
import { useSelector } from 'react-redux'
import useCurrencyCode from '../../utils/hooks/state-selectors/UseCurrencyCode'
import Colors from '../../common/Colors'
import { SATOSHIS_IN_BTC } from '../../common/constants/Bitcoin'
import CurrencyKind from '../../common/data/enums/CurrencyKind'
import Fonts from '../../common/Fonts'
import getAvatarForSubAccount from '../../utils/accounts/GetAvatarForSubAccountKind'
import useCurrencyCode from '../../utils/hooks/state-selectors/UseCurrencyCode'
import DashedContainerSmall from './DashedContainerSmall'

export type Props = {
sourcePrimarySubAccount: any;
Expand Down
31 changes: 10 additions & 21 deletions src/pages/FriendsAndFamily/AddGiftToAccount.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@
import idx from 'idx'
import React, { useEffect, useMemo, useState } from 'react'
import { View, Text, StyleSheet, TouchableOpacity, TextInput, Platform, Keyboard, Alert, ActivityIndicator } from 'react-native'
import { useDispatch, useSelector } from 'react-redux'
import { ActivityIndicator, StyleSheet, Text, TouchableOpacity, View } from 'react-native'
import { RFValue } from 'react-native-responsive-fontsize'
import {
widthPercentageToDP as wp,
heightPercentageToDP as hp,
heightPercentageToDP as hp, widthPercentageToDP as wp
} from 'react-native-responsive-screen'
import { useDispatch, useSelector } from 'react-redux'
import { AccountType } from '../../bitcoin/utilities/Interface'
import Colors from '../../common/Colors'
import BitcoinUnit from '../../common/data/enums/BitcoinUnit'
import AccountShell from '../../common/data/models/AccountShell'
import Fonts from '../../common/Fonts'
import { RFValue } from 'react-native-responsive-fontsize'
import idx from 'idx'
import { giftAccepted, refreshAccountShells } from '../../store/actions/accounts'
import { associateGift } from '../../store/actions/trustedContacts'
import usePrimarySubAccountForShell from '../../utils/hooks/account-utils/UsePrimarySubAccountForShell'
import useSpendableBalanceForAccountShell from '../../utils/hooks/account-utils/UseSpendableBalanceForAccountShell'
import useFormattedUnitText from '../../utils/hooks/formatting/UseFormattedUnitText'
import AccountShell from '../../common/data/models/AccountShell'
import BitcoinUnit from '../../common/data/enums/BitcoinUnit'
import useActiveAccountShells from '../../utils/hooks/state-selectors/accounts/UseActiveAccountShells'
import AccountSelection from './AccountSelection'
import { associateGift } from '../../store/actions/trustedContacts'
import { resetStackToAccountDetails, } from '../../navigation/actions/NavigationActions'
import AccountSelected from './AccountSelected'
import AccountSelection from './AccountSelection'
import GiftAddedModal from './GiftAddedModal'
import { giftAccepted, refreshAccountShells } from '../../store/actions/accounts'
// import useAccountShellFromNavigation from '../../utils/hooks/state-selectors/accounts/UseAccountShellFromNavigation'
import useAccountShellForID from '../../utils/hooks/state-selectors/accounts/UseAccountShellForID'
import { updateTempAccID } from '../../store/actions/doNotStore'

export type Props = {
navigation: any;
Expand Down Expand Up @@ -215,7 +210,6 @@ const styles = StyleSheet.create( {
justifyContent: 'center',
alignItems: 'center',
borderRadius: 8,
elevation: 10,
alignSelf: 'center',
marginLeft: wp( '8%' ),
},
Expand Down Expand Up @@ -331,11 +325,6 @@ const styles = StyleSheet.create( {
justifyContent: 'center',
alignItems: 'center',
borderRadius: 8,
shadowColor: Colors.shadowBlue,
shadowOpacity: 1,
shadowOffset: {
width: 15, height: 15
},
backgroundColor: Colors.blue,
},
availableToSpendText: {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/FriendsAndFamily/CreateGift.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ const CreateGift = ( { route, navigation }: Props ) => {

return (
<TouchableOpacity
disabled={isDisabled}
// disabled={isDisabled}
onPress={() => {
if ( satCard ) {
setShowVerification( true )
Expand Down
2 changes: 1 addition & 1 deletion src/pages/FriendsAndFamily/DahsedLargeContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const DashedLargeContainer = ( props ) => {
}}>
{props.subText}
</Text>
{!props.isAccept ? '\n\nScan the QR and receive bitcoin in your Bitcoin Tribe bitcoin wallet.': '\n\nYou can either add the sats to an Account or retain it to forward to your loved ones.'}
{!props.isAccept ? '\n\nScan the QR and receive bitcoin in your Bitcoin Tribe wallet.': '\n\nYou can either add the sats to an Account or retain it to forward to your loved ones.'}
</Text>
</View>
{props.date &&
Expand Down
9 changes: 5 additions & 4 deletions src/pages/ManagePasscodeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Fonts from '../common/Fonts'

import { heightPercentageToDP, widthPercentageToDP } from 'react-native-responsive-screen'
import { useDispatch, useSelector } from 'react-redux'
import LoginMethod from 'src/common/interfaces/LoginMethod'
import { translations } from '../common/content/LocContext'
import HeaderTitle from '../components/HeaderTitle'
import { credsAuth, switchReLogin } from '../store/actions/setupAndAuth'
Expand Down Expand Up @@ -81,7 +82,7 @@ export default function ManagePasscodeScreen( props ) {
}}>
<View>
<Text style={styles.headerInfoText}>
{strings.enter_your}{' '}
{strings.enter_your}{''}
<Text style={styles.boldItalicText}>{strings.existingPasscode}</Text>
</Text>
<View style={styles.passcodeTextInputView}>
Expand Down Expand Up @@ -227,7 +228,7 @@ export default function ManagePasscodeScreen( props ) {
<TouchableOpacity
disabled={pin.length == 4 ? false : true}
onPress={() => {
dispatch( credsAuth( pin, true ) )
dispatch( credsAuth( pin, LoginMethod.PIN, true ) )
//props.navigation.navigate('SettingGetNewPin')
//PinChangeSuccessBottomSheet.current.snapTo(1);
}}
Expand Down Expand Up @@ -484,8 +485,8 @@ const styles = StyleSheet.create( {
marginBottom: heightPercentageToDP( '4.5%' ),
},
boldItalicText: {
fontFamily: Fonts.MediumItalic,
fontWeight: 'bold',
fontFamily: Fonts.Regular,
// fontWeight: 'bold',
fontStyle: 'italic',
},
headerTitleText: {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/SettingGetNewPin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -806,8 +806,8 @@ const styles = StyleSheet.create( {
fontFamily: Fonts.Medium,
},
boldItalicText: {
fontFamily: Fonts.MediumItalic,
fontWeight: 'bold',
fontFamily: Fonts.Regular,
// fontWeight: 'bold',
fontStyle: 'italic',
},
headerTitleText: {
Expand Down

0 comments on commit 4c8c5b1

Please sign in to comment.