From 9e4709fcafcf8521a8abfa114b16e18e1747d8ff Mon Sep 17 00:00:00 2001 From: akshay8551 Date: Fri, 10 May 2024 08:25:39 +0530 Subject: [PATCH 1/6] Resolved - Should be constant no need to add Bold font #7118 --- src/pages/ManagePasscodeScreen.tsx | 9 +++++---- src/pages/SettingGetNewPin.tsx | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/pages/ManagePasscodeScreen.tsx b/src/pages/ManagePasscodeScreen.tsx index 1b09f802f..37879812a 100644 --- a/src/pages/ManagePasscodeScreen.tsx +++ b/src/pages/ManagePasscodeScreen.tsx @@ -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' @@ -81,7 +82,7 @@ export default function ManagePasscodeScreen( props ) { }}> - {strings.enter_your}{' '} + {strings.enter_your}{''} {strings.existingPasscode} @@ -227,7 +228,7 @@ export default function ManagePasscodeScreen( props ) { { - dispatch( credsAuth( pin, true ) ) + dispatch( credsAuth( pin, LoginMethod.PIN, true ) ) //props.navigation.navigate('SettingGetNewPin') //PinChangeSuccessBottomSheet.current.snapTo(1); }} @@ -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: { diff --git a/src/pages/SettingGetNewPin.tsx b/src/pages/SettingGetNewPin.tsx index 82bc8f831..cfc4cec8b 100644 --- a/src/pages/SettingGetNewPin.tsx +++ b/src/pages/SettingGetNewPin.tsx @@ -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: { From d98aec4d56c65ceb00121ff288c1e1610c9be78a Mon Sep 17 00:00:00 2001 From: akshay8551 Date: Fri, 10 May 2024 08:32:47 +0530 Subject: [PATCH 2/6] AddGiftTpAccnt - Need to remove shadow in CTA (Small UI ) #7118 --- .../FriendsAndFamily/AccountSelected.tsx | 21 ++++++------- .../FriendsAndFamily/AddGiftToAccount.tsx | 31 ++++++------------- 2 files changed, 19 insertions(+), 33 deletions(-) diff --git a/src/pages/FriendsAndFamily/AccountSelected.tsx b/src/pages/FriendsAndFamily/AccountSelected.tsx index 84a29626b..91975ea84 100644 --- a/src/pages/FriendsAndFamily/AccountSelected.tsx +++ b/src/pages/FriendsAndFamily/AccountSelected.tsx @@ -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; diff --git a/src/pages/FriendsAndFamily/AddGiftToAccount.tsx b/src/pages/FriendsAndFamily/AddGiftToAccount.tsx index 2c7d035a5..7ce2a4de6 100644 --- a/src/pages/FriendsAndFamily/AddGiftToAccount.tsx +++ b/src/pages/FriendsAndFamily/AddGiftToAccount.tsx @@ -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; @@ -215,7 +210,6 @@ const styles = StyleSheet.create( { justifyContent: 'center', alignItems: 'center', borderRadius: 8, - elevation: 10, alignSelf: 'center', marginLeft: wp( '8%' ), }, @@ -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: { From dabb0451c934d2885dd51f96870ee733149bcef1 Mon Sep 17 00:00:00 2001 From: akshay8551 Date: Fri, 10 May 2024 08:37:23 +0530 Subject: [PATCH 3/6] Resolved - Content update on gift creation #7116 --- src/pages/FriendsAndFamily/DahsedLargeContainer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/FriendsAndFamily/DahsedLargeContainer.tsx b/src/pages/FriendsAndFamily/DahsedLargeContainer.tsx index 5688b293f..06617fcbe 100644 --- a/src/pages/FriendsAndFamily/DahsedLargeContainer.tsx +++ b/src/pages/FriendsAndFamily/DahsedLargeContainer.tsx @@ -125,7 +125,7 @@ const DashedLargeContainer = ( props ) => { }}> {props.subText} - {!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.'} {props.date && From 07195d9c4e4f8a55acb26f359e915379381f3fb1 Mon Sep 17 00:00:00 2001 From: akshay8551 Date: Fri, 10 May 2024 17:25:28 +0530 Subject: [PATCH 4/6] Resolved - Gift Creation insufficient balance #7140 --- src/pages/FriendsAndFamily/CreateGift.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/FriendsAndFamily/CreateGift.tsx b/src/pages/FriendsAndFamily/CreateGift.tsx index 5eda08b0e..284a3ade5 100644 --- a/src/pages/FriendsAndFamily/CreateGift.tsx +++ b/src/pages/FriendsAndFamily/CreateGift.tsx @@ -191,13 +191,13 @@ const CreateGift = ( { route, navigation }: Props ) => { const numberOfGifts = numbersOfGift ? Number( numbersOfGift ) : 1 if ( prefersBitcoin ) { if ( !includeFees && averageLowTxFee ) giftAmount += averageLowTxFee - return giftAmount * numberOfGifts > spendableBalance + return giftAmount * numberOfGifts < spendableBalance } else { const giftAmountInFiat = giftAmount ? giftAmount : 1 const spendableBalanceInFiat = parseFloat( convertSatsToFiat( spendableBalance ) ) - return giftAmountInFiat * numberOfGifts > spendableBalanceInFiat + return giftAmountInFiat * numberOfGifts < spendableBalanceInFiat } }, [ currentSatsAmountFormValue, @@ -336,7 +336,7 @@ const CreateGift = ( { route, navigation }: Props ) => { return ( { if ( satCard ) { setShowVerification( true ) From 68a9c29347e01bacfadf3bf1e1064cf6f11143b9 Mon Sep 17 00:00:00 2001 From: akshay8551 Date: Mon, 13 May 2024 13:57:36 +0530 Subject: [PATCH 5/6] revert change --- src/pages/FriendsAndFamily/CreateGift.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/pages/FriendsAndFamily/CreateGift.tsx b/src/pages/FriendsAndFamily/CreateGift.tsx index 284a3ade5..cbfbfc6d6 100644 --- a/src/pages/FriendsAndFamily/CreateGift.tsx +++ b/src/pages/FriendsAndFamily/CreateGift.tsx @@ -188,16 +188,20 @@ const CreateGift = ( { route, navigation }: Props ) => { const isAmountInvalid = useMemo( () => { let giftAmount = currentSatsAmountFormValue + console.log('giftAmount', giftAmount) const numberOfGifts = numbersOfGift ? Number( numbersOfGift ) : 1 + console.log('numberOfGifts', numberOfGifts) + console.log('prefersBitcoin', prefersBitcoin) if ( prefersBitcoin ) { + console.log('averageLowTxFee', averageLowTxFee) if ( !includeFees && averageLowTxFee ) giftAmount += averageLowTxFee - return giftAmount * numberOfGifts < spendableBalance + return giftAmount * numberOfGifts > spendableBalance } else { const giftAmountInFiat = giftAmount ? giftAmount : 1 const spendableBalanceInFiat = parseFloat( convertSatsToFiat( spendableBalance ) ) - return giftAmountInFiat * numberOfGifts < spendableBalanceInFiat + return giftAmountInFiat * numberOfGifts > spendableBalanceInFiat } }, [ currentSatsAmountFormValue, @@ -208,7 +212,7 @@ const CreateGift = ( { route, navigation }: Props ) => { numbersOfGift, currencyKind, ] ) - +console.log('isAmountInvalid', isAmountInvalid) useEffect( () => { if ( accountsState.selectedGiftId && From 68d9c34fedc4089fa64dd1d3ac1a40ab21abdaa5 Mon Sep 17 00:00:00 2001 From: akshay8551 Date: Mon, 13 May 2024 13:58:13 +0530 Subject: [PATCH 6/6] removed logs --- src/pages/FriendsAndFamily/CreateGift.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/pages/FriendsAndFamily/CreateGift.tsx b/src/pages/FriendsAndFamily/CreateGift.tsx index cbfbfc6d6..17f3a8c37 100644 --- a/src/pages/FriendsAndFamily/CreateGift.tsx +++ b/src/pages/FriendsAndFamily/CreateGift.tsx @@ -188,12 +188,8 @@ const CreateGift = ( { route, navigation }: Props ) => { const isAmountInvalid = useMemo( () => { let giftAmount = currentSatsAmountFormValue - console.log('giftAmount', giftAmount) const numberOfGifts = numbersOfGift ? Number( numbersOfGift ) : 1 - console.log('numberOfGifts', numberOfGifts) - console.log('prefersBitcoin', prefersBitcoin) if ( prefersBitcoin ) { - console.log('averageLowTxFee', averageLowTxFee) if ( !includeFees && averageLowTxFee ) giftAmount += averageLowTxFee return giftAmount * numberOfGifts > spendableBalance } else { @@ -212,7 +208,7 @@ const CreateGift = ( { route, navigation }: Props ) => { numbersOfGift, currencyKind, ] ) -console.log('isAmountInvalid', isAmountInvalid) + useEffect( () => { if ( accountsState.selectedGiftId &&