Skip to content

Commit

Permalink
Merge branch 'feature/2.05' into giftingSats
Browse files Browse the repository at this point in the history
  • Loading branch information
Parsh committed Oct 25, 2021
2 parents e6a88a3 + c30b168 commit 45a5810
Show file tree
Hide file tree
Showing 21 changed files with 306 additions and 182 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Expand Up @@ -59,7 +59,7 @@ android {
applicationId "io.hexawallet.hexa"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 371
versionCode 372
versionName "2.0.1"
missingDimensionStrategy 'react-native-camera', 'general'
multiDexEnabled true
Expand Down
12 changes: 6 additions & 6 deletions ios/HEXA.xcodeproj/project.pbxproj
Expand Up @@ -1067,7 +1067,7 @@
CODE_SIGN_ENTITLEMENTS = HEXA/Hexa.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 371;
CURRENT_PROJECT_VERSION = 372;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
Expand Down Expand Up @@ -1098,7 +1098,7 @@
CODE_SIGN_ENTITLEMENTS = HEXA/Hexa.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 371;
CURRENT_PROJECT_VERSION = 372;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = Y5TCB759QL;
INFOPLIST_FILE = HEXA/Info.plist;
Expand Down Expand Up @@ -1127,7 +1127,7 @@
CODE_SIGN_ENTITLEMENTS = HEXA/Hexa.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 371;
CURRENT_PROJECT_VERSION = 372;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = Y5TCB759QL;
ENABLE_BITCODE = NO;
Expand Down Expand Up @@ -1163,7 +1163,7 @@
CODE_SIGN_ENTITLEMENTS = HEXA/Hexa.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 371;
CURRENT_PROJECT_VERSION = 372;
DEVELOPMENT_TEAM = Y5TCB759QL;
INFOPLIST_FILE = "HEXA/HEXA.Dev-Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
Expand Down Expand Up @@ -1192,7 +1192,7 @@
CODE_SIGN_ENTITLEMENTS = HEXA/Hexa.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 371;
CURRENT_PROJECT_VERSION = 372;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = Y5TCB759QL;
ENABLE_BITCODE = NO;
Expand Down Expand Up @@ -1224,7 +1224,7 @@
CODE_SIGN_ENTITLEMENTS = HEXA/Hexa.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 371;
CURRENT_PROJECT_VERSION = 372;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = Y5TCB759QL;
INFOPLIST_FILE = "HEXA/HEXA.Stage-Info.plist";
Expand Down
3 changes: 3 additions & 0 deletions src/assets/images/svgs/icon_arrow_right.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/common/Colors.js
Expand Up @@ -30,6 +30,7 @@ const Colors = {
currencyGray: '#d0d0d0',
seaBlue: '#CFE8F8',
deepBlue: '#04578B',
blueText: '#1582C4',
babyGray: '#BCB6B6',
greyTextColor: '#656565',
coral: '#D35400',
Expand Down
2 changes: 1 addition & 1 deletion src/common/Styles/Styles.js
Expand Up @@ -38,7 +38,7 @@ export default StyleSheet.create( {
fontSize: RFValue( 12 ),
marginLeft: 20,
fontFamily: Fonts.FiraSansRegular,
marginTop: heightPercentageToDP( 1 ),
marginTop: heightPercentageToDP( 0.5 ),
letterSpacing: 0.6
},
headerInfoText: {
Expand Down
11 changes: 2 additions & 9 deletions src/components/BottomInfoBox.tsx
Expand Up @@ -4,6 +4,7 @@ import Colors from '../common/Colors'
import Fonts from '../common/Fonts'
import { RFValue } from 'react-native-responsive-fontsize'
import { widthPercentageToDP } from 'react-native-responsive-screen'
import ArrowRight from '../assets/images/svgs/icon_arrow_right.svg'

export default function BottomInfoBox( props ) {
return (
Expand Down Expand Up @@ -65,15 +66,7 @@ export default function BottomInfoBox( props ) {
</Text>
</View>
{props.icon &&
<Image source={require( '../assets/images/icons/icon_arrow.png' )}
style={{
width: widthPercentageToDP( '3.6%' ),
height: widthPercentageToDP( '3.6%' ),
alignSelf: 'center',
marginLeft: 'auto',
resizeMode: 'contain'
}}
/>
<ArrowRight />
}
</View>
)
Expand Down
1 change: 1 addition & 0 deletions src/components/RecipientAvatar.tsx
Expand Up @@ -46,6 +46,7 @@ const RecipientAvatar: React.FC<Props> = ( {
style={{
textAlign: 'center',
fontSize: 14,
fontWeight: '500'
}}
>
{nameToInitials(
Expand Down
127 changes: 80 additions & 47 deletions src/components/RequestKeyFromContact.tsx
Expand Up @@ -132,54 +132,63 @@ function RequestKeyFromContact( props ) {
shadowRadius: 10,
elevation: 2,
alignSelf: 'center',
borderRadius: wp( 2 ),
borderTopRightRadius: wp( 2 ),
borderBottomRightRadius: wp( 2 ),
borderTopLeftRadius: contact && Object.keys( contact ).length !== 0 ? wp( 90/2 ) : wp( 2 ),
borderBottomLeftRadius: contact && Object.keys( contact ).length !== 0 ? wp( 90/2 ) : wp( 2 ),
marginTop: hp( 1 ),
marginBottom: hp( 1 ),
paddingVertical: hp( 2 ),
paddingHorizontal: wp( 3 ),
paddingVertical: contact && Object.keys( contact ).length !== 0 ? hp( 0 ) : hp( 2 ),
paddingRight: wp( 3 ),
flexDirection: 'row',
alignItems: 'center'
alignItems: 'center',
paddingHorizontal: contact && Object.keys( contact ).length !== 0 ? hp( 0 ) : wp( 3 )
}}>
{contact ? Object.keys( contact ).length !== 0 ? contact.imageAvailable ?
<Image
source={contact.image}
style={{
...styles.contactProfileImage
}}
/>
: (
<View
<View style={styles.contactProfileImageContainer}>
<Image
source={contact.image}
style={{
alignItems: 'center',
justifyContent: 'center',
backgroundColor: Colors.backgroundColor,
width: 70,
height: 70,
borderRadius: 70 / 2,
shadowColor: Colors.shadowBlue,
shadowOpacity: 1,
shadowOffset: {
width: 2, height: 2
},
...styles.contactProfileImage
}}
>
<Text
/>
</View>

: (
<View style={styles.contactProfileImageContainer}>
<View
style={{
textAlign: 'center',
fontSize: RFValue( 20 ),
lineHeight: RFValue( 20 ), //... One for top and one for bottom alignment
alignItems: 'center',
justifyContent: 'center',
backgroundColor: Colors.backgroundColor,
width: 80,
height: 80,
borderRadius: 80 / 2,
// shadowColor: Colors.shadowBlue,
// shadowOpacity: 1,
// shadowOffset: {
// width: 2, height: 2
// },
}}
>
{nameToInitials(
Contact && Contact.firstName && Contact.lastName
? Contact.firstName + ' ' + Contact.lastName
: Contact && Contact.firstName && !Contact.lastName
? Contact.firstName
: Contact && !Contact.firstName && Contact.lastName
? Contact.lastName
: '',
)}
</Text>
<Text
style={{
textAlign: 'center',
fontSize: RFValue( 20 ),
lineHeight: RFValue( 20 ), //... One for top and one for bottom alignment
}}
>
{nameToInitials(
Contact && Contact.firstName && Contact.lastName
? Contact.firstName + ' ' + Contact.lastName
: Contact && Contact.firstName && !Contact.lastName
? Contact.firstName
: Contact && !Contact.firstName && Contact.lastName
? Contact.lastName
: '',
)}
</Text>
</View>
</View>
)
: <GiftCard /> : <GiftCard />
Expand Down Expand Up @@ -304,11 +313,24 @@ function RequestKeyFromContact( props ) {
// <BottomInfoBox
// infoText={'Your friend will be prompted to enter their OTP while accepting the gift card'}
// />
<BottomInfoBox
infoText={
`Your friend will be prompted to enter ${props.encryptLinkWith === DeepLinkEncryptionType.NUMBER ? 'their phone number' : props.encryptLinkWith === DeepLinkEncryptionType.EMAIL ? 'their email' : `OTP ${props.encryptionKey}`}`
}
/>
<Text style={{
color: Colors.textColorGrey,
fontSize: RFValue( 12 ),
letterSpacing: 0.6,
// marginBottom: 2,
// fontFamily: Fonts.FiraSansRegular,
marginHorizontal: wp( 6 ),
lineHeight: 18,
marginVertical: hp( 2 )
}}>
{'Your friend will be prompted to enter '}
<Text style={{
fontWeight: '600'
}}>
{props.encryptLinkWith === DeepLinkEncryptionType.NUMBER ? 'phone number ' : props.encryptLinkWith === DeepLinkEncryptionType.EMAIL ? 'email ' : `OTP ${props.encryptionKey} `}
</Text>
while acceptin the gift card
</Text>
}
{!props.isGift &&
<View
Expand Down Expand Up @@ -383,7 +405,7 @@ function RequestKeyFromContact( props ) {
buttonOneText={'Share Link'}
onButtonPress={( type ) => shareViaLinkOrQR( type )}
buttonTwoIcon={<Link />}
buttonTwoText={'Share Image'}
buttonTwoText={'Share QR'}
/>

<View style={styles.statusIndicatorView}>
Expand All @@ -398,10 +420,21 @@ function RequestKeyFromContact( props ) {
}
const styles = StyleSheet.create( {
contactProfileImage: {
width: 70,
height: 70,
width: 81,
height: 81,
resizeMode: 'cover',
borderRadius: 81 / 2,
},
contactProfileImageContainer: {
width: 90,
height: 90,
resizeMode: 'cover',
borderRadius: 70 / 2,
borderRadius: 90 / 2,
backgroundColor: Colors.white,
justifyContent: 'center',
alignItems: 'center',
borderColor: Colors.offWhite,
borderWidth: 1
},
dashedStyle: {
backgroundColor: Colors.gray7,
Expand Down
12 changes: 6 additions & 6 deletions src/components/account-details/AccountDetailsCard.tsx
Expand Up @@ -115,15 +115,12 @@ const AccountDetailsCard: React.FC<Props> = ( {
onAppStateChange
)
return () => AppState.removeEventListener( 'change', onAppStateChange )
} )
}, [] )

const onAppStateChange = ( state ) => {
if( state === 'background' && swanModal && !primarySubAccount.isUsable &&
primarySubAccount.kind === SubAccountKind.SERVICE &&
( primarySubAccount as ExternalServiceSubAccountInfo ).serviceAccountKind === ServiceAccountKind.SWAN
) {
showSwanModal( false )
if( state === 'active' && ( primarySubAccount as ExternalServiceSubAccountInfo ).serviceAccountKind === ServiceAccountKind.SWAN ) {
navigation.pop()
// showSwanModal( false )
}
}
useEffect( () => {
Expand Down Expand Up @@ -251,8 +248,10 @@ const AccountDetailsCard: React.FC<Props> = ( {
)
}


return (
<View style={rootContainerStyle}>
{swanModal &&
<ModalContainer visible={swanModal} closeBottomSheet={() => {}} >
<BottomSheetSwanInfo
swanDeepLinkContent={swanDeepLinkContent}
Expand All @@ -268,6 +267,7 @@ const AccountDetailsCard: React.FC<Props> = ( {
}}
/>
</ModalContainer>
}
<ImageBackground
source={backgroundImageForAccountKind( primarySubAccount )}
style={{
Expand Down
2 changes: 1 addition & 1 deletion src/components/know-more-sheets/GiftKnowMoreModel.tsx
Expand Up @@ -66,7 +66,7 @@ export default function TestAccountKnowMoreSheetContents( props ) {
marginBottom: wp( '1%' ),
}}
>
Hexa allows you to create bitcoin Gifts in a form of a link or QR code that you can send to anyone even if they are not in your Friends & Family list
Hexa creates a link or QR code for you that allows you to send bitcoin as gifts to anyone using Hexa wallet.
</Text>
<View style={{
justifyContent: 'center', alignItems: 'center'
Expand Down
2 changes: 1 addition & 1 deletion src/navigation/stacks/Header.tsx
Expand Up @@ -525,7 +525,7 @@ class Home extends PureComponent<HomePropsTypes, HomeStateTypes> {
if( nextAppState === 'background' ) {
this.closeBottomSheet()
}
console.log( 'inside if nextAppState', nextAppState )
// console.log( 'inside if nextAppState', nextAppState )
this.props.updatePreference( {
key: 'hasShownNoInternetWarning',
value: false,
Expand Down

0 comments on commit 45a5810

Please sign in to comment.