Skip to content

Commit

Permalink
Merge branch 'develop' into feat/history-offer-connetion-share-proof
Browse files Browse the repository at this point in the history
  • Loading branch information
sairanjit authored Oct 28, 2024
2 parents 24db833 + b39311c commit bde5e48
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 19 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ android {
applicationId "id.credebl.adeya"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 17
versionName "1.0.11"
versionCode 18
versionName "1.0.12"

missingDimensionStrategy 'react-native-camera', 'general'
}
Expand Down
1 change: 1 addition & 0 deletions app/components/record/W3CCredentialRecordField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ const W3CCredentialRecordField: React.FC<W3CCredentialRecordFieldProps> = ({
valueText: {
...ListItems.recordAttributeText,
paddingVertical: 4,
width: '90%',
},
})

Expand Down
43 changes: 31 additions & 12 deletions app/screens/CredentialDetailsW3C.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import type { StackScreenProps } from '@react-navigation/stack'

import {
CredentialExchangeRecord,
CredentialState,
W3cCredentialRecord,
getW3cCredentialRecordById,
deleteCredentialExchangeRecordById,
useCredentialByState,
CredentialState,
getW3cCredentialRecordById,
useConnections,
useCredentialByState,
} from '@adeya/ssi'
import { BrandingOverlay } from '@hyperledger/aries-oca'
import { CredentialOverlay } from '@hyperledger/aries-oca/build/legacy'
Expand Down Expand Up @@ -47,6 +47,33 @@ const paddingHorizontal = 24
const paddingVertical = 16
const logoHeight = 80

const getPageSize = (prettyVc: { orientation: 'landscape' | 'portrait'; height?: number; width?: number }) => {
if (prettyVc?.height && prettyVc?.width) {
if (Platform.OS === 'android') {
const height = prettyVc.height * 0.75
const width = prettyVc.width * 0.75

return {
width,
height,
}
}

const height = prettyVc.height * 0.81
const width = prettyVc.width * 0.81

return {
width,
height,
}
}

return {
width: prettyVc.orientation === 'landscape' ? 595 : 842,
height: prettyVc.orientation === 'landscape' ? 420 : 595,
}
}

const CredentialDetailsW3C: React.FC<CredentialDetailsProps> = ({ navigation, route }) => {
if (!route?.params) {
throw new Error('CredentialDetails route prams were not set properly')
Expand Down Expand Up @@ -314,13 +341,6 @@ const CredentialDetailsW3C: React.FC<CredentialDetailsProps> = ({ navigation, ro
)
}

const getA4Sizes = (type: 'landscape' | 'portrait') => {
return {
width: type === 'landscape' ? 842 : 595,
height: type === 'landscape' ? 595 : 842,
}
}

const generateQRCodeString = async (text: string) => {
return toQRCodeString(text, {
width: 95,
Expand Down Expand Up @@ -369,8 +389,7 @@ const CredentialDetailsW3C: React.FC<CredentialDetailsProps> = ({ navigation, ro
fileName: w3cCredential?.credential.type[1],
padding: 0,
directory: 'Documents',
// add height and width to the options of a4 paper size
...getA4Sizes(prettyVc.orientation),
...getPageSize(prettyVc),
}

const file = await RNHTMLtoPDF.convert(options)
Expand Down
2 changes: 1 addition & 1 deletion app/screens/RenderCertificate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const RenderCertificate: React.FC<RenderCertificateProps> = ({ navigation, route

return (
<SafeAreaView style={styles.container} edges={['left', 'right']}>
<Pdf source={{ uri: filePath }} style={styles.pdf} />
<Pdf source={{ uri: filePath }} style={styles.pdf} maxScale={10.0} />
</SafeAreaView>
)
}
Expand Down
8 changes: 4 additions & 4 deletions ios/AdeyaWallet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = AdeyaWallet/AdeyaWallet.entitlements;
CURRENT_PROJECT_VERSION = 48;
CURRENT_PROJECT_VERSION = 51;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = Z5W7KRPGHZ;
ENABLE_BITCODE = NO;
Expand All @@ -518,7 +518,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.11;
MARKETING_VERSION = 1.0.12;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -546,7 +546,7 @@
CODE_SIGN_ENTITLEMENTS = AdeyaWallet/AdeyaWallet.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 48;
CURRENT_PROJECT_VERSION = 51;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = Z5W7KRPGHZ;
INFOPLIST_FILE = AdeyaWallet/Info.plist;
Expand All @@ -556,7 +556,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.11;
MARKETING_VERSION = 1.0.12;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down

0 comments on commit bde5e48

Please sign in to comment.